mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
Fix commas edge case in strings when parsing an assembly line (#1201)
This commit is contained in:
parent
cf41c3b136
commit
13b90874f9
@ -2418,6 +2418,9 @@ bool ppcAssembler_assembleSingleInstruction(char const* text, PPCAssemblerInOut*
|
|||||||
_ppcAssembler_translateAlias(instructionName);
|
_ppcAssembler_translateAlias(instructionName);
|
||||||
// parse operands
|
// parse operands
|
||||||
internalInfo.listOperandStr.clear();
|
internalInfo.listOperandStr.clear();
|
||||||
|
|
||||||
|
bool isInString = false;
|
||||||
|
|
||||||
while (currentPtr < endPtr)
|
while (currentPtr < endPtr)
|
||||||
{
|
{
|
||||||
currentPtr++;
|
currentPtr++;
|
||||||
@ -2425,7 +2428,10 @@ bool ppcAssembler_assembleSingleInstruction(char const* text, PPCAssemblerInOut*
|
|||||||
// find end of operand
|
// find end of operand
|
||||||
while (currentPtr < endPtr)
|
while (currentPtr < endPtr)
|
||||||
{
|
{
|
||||||
if (*currentPtr == ',')
|
if (*currentPtr == '"')
|
||||||
|
isInString=!isInString;
|
||||||
|
|
||||||
|
if (*currentPtr == ',' && !isInString)
|
||||||
break;
|
break;
|
||||||
currentPtr++;
|
currentPtr++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user