mirror of https://github.com/Chlumsky/msdfgen.git
Adding a fix to readNoteType so it properly advances the string when it didn't read a new command char and reruns the same command.
This commit is contained in:
parent
746767a62b
commit
be0895c88b
|
|
@ -24,10 +24,12 @@ namespace msdfgen {
|
|||
static bool readNodeType(char &output, const char *&pathDef) {
|
||||
int shift;
|
||||
char nodeType;
|
||||
if (sscanf(pathDef, " %c%n", &nodeType, &shift) == 1 && nodeType != '+' && nodeType != '-' && nodeType != '.' && nodeType != ',' && (nodeType < '0' || nodeType > '9')) {
|
||||
if (sscanf(pathDef, " %c%n", &nodeType, &shift) == 1) {
|
||||
pathDef += shift;
|
||||
output = nodeType;
|
||||
return true;
|
||||
if (nodeType != '+' && nodeType != '-' && nodeType != '.' && nodeType != ',' && (nodeType < '0' || nodeType > '9')) {
|
||||
output = nodeType;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue