Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tools/cgcomp/source/fpparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,15 @@ const char* CFPParser::ParseOutputRegAlias(const char *token,s32 *reg,u8 *is_fp1
size_t tlen = strlen(token);

// cut off the dst mask for comparison
for (u32 i=0;i < tlen && token[i] != '.';i++, len++) ;
while ((len < it->alias.size() && len < tlen) && // Bounds check
(token[len] != '.' && token[len] != '(' && token[len] != '\0')) { // Delimiter check
len++;
}

if(strncmp(token, it->alias.c_str(), len) == 0) {
*reg = it->index;
*is_fp16 = it->is_fp16;
return (token + it->alias.size());
return token + len;
}
}
return ParseOutputReg(token,reg,is_fp16);
Expand Down