Skip to content

properly escape % symbol in warning message #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ int
SscanfError(71, "End of text is not supported in enums.");
return SSCANF_FAIL_RETURN;
case '%':
SscanfWarning(25, "sscanf specifiers do not require '%' before them.");
SscanfWarning(25, "sscanf specifiers do not require '%%' before them.");
continue;
case '-':
{
Expand Down Expand Up @@ -584,7 +584,7 @@ int
len = 0;
break;
case '%':
SscanfWarning(25, "sscanf specifiers do not require '%' before them.");
SscanfWarning(25, "sscanf specifiers do not require '%%' before them.");
len = 0;
break;
case '-':
Expand Down
4 changes: 2 additions & 2 deletions sscanf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ static cell
}
return SSCANF_TRUE_RETURN;
case '%':
SscanfWarning(25, "sscanf specifiers do not require '%' before them.");
SscanfWarning(25, "sscanf specifiers do not require '%%' before them.");
continue;
default:
SscanfWarning(9, "Unknown format specifier '%c', skipping.", *(format - 1));
Expand Down Expand Up @@ -1391,7 +1391,7 @@ static cell
}
return SSCANF_TRUE_RETURN;
case '%':
SscanfWarning(25, "sscanf specifiers do not require '%' before them.");
SscanfWarning(25, "sscanf specifiers do not require '%%' before them.");
break;
default:
SscanfWarning(9, "Unknown format specifier '%c', skipping.", *(format - 1));
Expand Down