Report 1-based positions in wxFileConfig warning message

0-based positions are probably not what the users expect.
This commit is contained in:
Vadim Zeitlin
2025-07-06 22:53:13 +02:00
parent 9baa27b86e
commit 8cfb4897ec
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2151,7 +2151,7 @@ static wxString FilterInValue(const wxString& str)
else if ( i != end - 1 )
{
wxLogWarning(_("unexpected \" at position %zu in '%s'."),
i - str.begin(), str);
i - str.begin() + 1, str);
}
//else: it's the last quote of a quoted string, ok
}
+1 -1
View File
@@ -657,7 +657,7 @@ TEST_CASE_METHOD(LogTestCase, "wxFileConfig::Error", "[fileconfig][error]")
checkWarning("foo=\\", "trailing backslash");
// Check that it's the second quote which is unexpected, not the first one.
checkWarning(R"(foo="x"y)", R"(unexpected " at position 2)");
checkWarning(R"(foo="x"y)", R"(unexpected " at position 3)");
}
#endif // wxUSE_FILECONFIG