From 138f555a88a5dacdabe458134cf3e266610eb7d9 Mon Sep 17 00:00:00 2001 From: SyS Date: Thu, 18 Jan 2024 09:17:26 +0530 Subject: [PATCH] properly escape % symbol in warning message --- enum.cpp | 4 ++-- sscanf.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/enum.cpp b/enum.cpp index 5c48749..0a7455d 100644 --- a/enum.cpp +++ b/enum.cpp @@ -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 '-': { @@ -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 '-': diff --git a/sscanf.cpp b/sscanf.cpp index 028f37e..bb076d7 100644 --- a/sscanf.cpp +++ b/sscanf.cpp @@ -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)); @@ -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));