Skip to content

Commit 394cc17

Browse files
committed
[[ LCB ]] Make sure 'describe' field of ZStringUTF8 is nullptr
This patch fixes a crash due to the 'describe' field in the foreign descriptor for the ZString foreign types being uninitialized.
1 parent 09a6592 commit 394cc17

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libscript/src/module-foreign.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ extern "C" bool com_livecode_foreign_Initialize(void)
333333
d . hash = __cstring_hash;
334334
d . doimport = __nativecstring_import;
335335
d . doexport = __nativecstring_export;
336+
d . describe = nullptr;
336337
if (!__build_typeinfo("com.livecode.foreign.NativeCString", &d, kMCNativeCStringTypeInfo))
337338
return false;
338339

@@ -351,6 +352,7 @@ extern "C" bool com_livecode_foreign_Initialize(void)
351352
d . hash = __wstring_hash;
352353
d . doimport = __wstring_import;
353354
d . doexport = __wstring_export;
355+
d . describe = nullptr;
354356
if (!__build_typeinfo("com.livecode.foreign.WString", &d, kMCWStringTypeInfo))
355357
return false;
356358

@@ -369,6 +371,7 @@ extern "C" bool com_livecode_foreign_Initialize(void)
369371
d . hash = __cstring_hash;
370372
d . doimport = __utf8string_import;
371373
d . doexport = __utf8string_export;
374+
d . describe = nullptr;
372375
if (!__build_typeinfo("com.livecode.foreign.UTF8String", &d, kMCUTF8StringTypeInfo))
373376
return false;
374377

0 commit comments

Comments
 (0)