Skip to content

Commit 36592f8

Browse files
"Fixed" a quasibug in parseIllustrationPathToSize()
There was an extra character in the format string of the sscanf.
1 parent 2391996 commit 36592f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ unsigned int zim::parseIllustrationPathToSize(const std::string& s)
111111
{
112112
int nw(0), nh(0), nEnd(0);
113113
long int w(-1), h(-1);
114-
if ( sscanf(s.c_str(), "Illustration_%n%ldx%n%ld@1%n)", &nw, &w, &nh, &h, &nEnd) == 2
114+
if ( sscanf(s.c_str(), "Illustration_%n%ldx%n%ld@1%n", &nw, &w, &nh, &h, &nEnd) == 2
115115
&& (size_t)nEnd == s.size() && !isspace(s[nw]) && !isspace(s[nh]) && w == h && w >= 0) {
116116
return (unsigned int)w;
117117
}

0 commit comments

Comments
 (0)