Minor consistency

This commit is contained in:
mid-kid 2024-11-04 00:44:53 +01:00
parent 6a04657b6f
commit fba27e30a2

View File

@ -14,9 +14,14 @@ __stdcall char *path_join(char *src, char *dst, size_t size); // 0x004110f0
// 0x00411b90
__stdcall int string_alloc(unsigned size, mwstring *string)
{
string->data = GlobalAlloc(GMEM_ZEROINIT, size);
char *data = GlobalAlloc(GMEM_ZEROINIT, size);
if (!data) {
string->data = NULL;
string->size = size;
return my_GetLastError();
}
string->data = data;
string->size = size;
if (!string->data) return my_GetLastError();
return 0;
}