Fix commas edge case in strings when parsing an assembly line (#1201)

This commit is contained in:
splatoon1enjoyer 2024-05-13 14:52:25 +00:00 committed by GitHub
parent cf41c3b136
commit 13b90874f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2418,6 +2418,9 @@ bool ppcAssembler_assembleSingleInstruction(char const* text, PPCAssemblerInOut*
_ppcAssembler_translateAlias(instructionName);
// parse operands
internalInfo.listOperandStr.clear();
bool isInString = false;
while (currentPtr < endPtr)
{
currentPtr++;
@ -2425,7 +2428,10 @@ bool ppcAssembler_assembleSingleInstruction(char const* text, PPCAssemblerInOut*
// find end of operand
while (currentPtr < endPtr)
{
if (*currentPtr == ',')
if (*currentPtr == '"')
isInString=!isInString;
if (*currentPtr == ',' && !isInString)
break;
currentPtr++;
}