Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-294

Nul-terminate C strings in test code

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Test
    • Labels:
      None

      Description

      The behavior of String's `Get_Ptr8` method has changed: it now consistently returns a memory buffer which is not nul-terminated.

      Lucy uses `Get_Ptr8` in numerous places. All of the runtime usages are OK, but there are a number of test cases that improperly assume that it returns a nul-terminated C string.

      The solution is to use `To_Utf8` instead, which returns a newly allocated nul-terminated buffer.

        Attachments

          Activity

            People

            • Assignee:
              creamyg Marvin Humphrey
              Reporter:
              creamyg Marvin Humphrey
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: