Skip to content

Commit

Permalink
Fix commas edge case in strings when parsing an assembly line (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
splatoon1enjoyer committed May 13, 2024
1 parent cf41c3b commit 13b9087
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Cemu/PPCAssembler/ppcAssembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2418,14 +2418,20 @@ bool ppcAssembler_assembleSingleInstruction(char const* text, PPCAssemblerInOut*
_ppcAssembler_translateAlias(instructionName);
// parse operands
internalInfo.listOperandStr.clear();

bool isInString = false;

while (currentPtr < endPtr)
{
currentPtr++;
startPtr = currentPtr;
// find end of operand
while (currentPtr < endPtr)
{
if (*currentPtr == ',')
if (*currentPtr == '"')
isInString=!isInString;

if (*currentPtr == ',' && !isInString)
break;
currentPtr++;
}
Expand Down

0 comments on commit 13b9087

Please sign in to comment.