Skip to content

Pool of _m_temporary_strings is too small #114

@Try

Description

@Try

De facto it's only one string at the moment :P

Example of failing code (de-compilation, CoM):

SYSTEMTIMEPTR = MEM_ALLOC(16);
CALL_PTRPARAM(SYSTEMTIMEPTR);
CALL__STDCALL(GETLOCALTIME);
TIMESTR = INTTOSTRING(MEM_READINT(SYSTEMTIMEPTR) & 2047);
TIMESTR = CONCATSTRINGS(CONCATSTRINGS(TIMESTR, "-"), INTTOSTRING(MEM_READINT(SYSTEMTIMEPTR + 2) & 2047));
TIMESTR = CONCATSTRINGS(CONCATSTRINGS(TIMESTR, "-"), INTTOSTRING(MEM_READINT(SYSTEMTIMEPTR + 6) & 2047));
TIMESTR = CONCATSTRINGS(CONCATSTRINGS(TIMESTR, " "), INTTOSTRING(MEM_READINT(SYSTEMTIMEPTR + 8) & 2047));
TIMESTR = CONCATSTRINGS(CONCATSTRINGS(TIMESTR, ":"), INTTOSTRING(MEM_READINT(SYSTEMTIMEPTR + 10) & 2047));
TIMESTR = CONCATSTRINGS(CONCATSTRINGS(TIMESTR, ":"), INTTOSTRING(MEM_READINT(SYSTEMTIMEPTR + 12) & 2047));
MEM_FREE(SYSTEMTIMEPTR);
MEM_INFO("");
ZERROR_SETTEMPLEVEL(1);
MEM_INFO(CONCATSTRINGS("Time: ", TIMESTR));

Nested CONCATSTRINGS cause corruption of _m_temporary_strings. Replacing to arbitrary larger size works, however proper dynamic allocation would be ideal.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmoddedIssues or features related to modifications of Gothic

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions