Uploaded image for project: 'libdiscid'
  1. libdiscid
  2. LIB-48

Fix asserts/return values on empty object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • libdiscid 0.6.0
    • libdiscid 0.2.2, libdiscid 0.5.1
    • None

      When not having done a read() or put() some attributes like the ID have undefined behavior.

      For discid_get_id() we have an assertion in debug builds and return NULL in release/normal builds.
      We shouldn't have assertion errors in anything the user can produce (debug build or not) when we can recover normally.

      Returning the empty string is an option in this case.

      At lest the current behavior should be mentioned in the documentation.

            jonnyjd Johannes Dewender
            jonnyjd Johannes Dewender
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                libdiscid 0.6.0