summaryrefslogtreecommitdiff
path: root/meme/marker.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-02-15 22:16:47 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-02-15 22:16:47 (GMT)
commit67a65895e02fd6d3211218e3ab53732df01f7e3b (patch)
tree4b2b8b5d9bde562404d7a85a6bcb67983796c173 /meme/marker.c
parentae68581caab6569b2c974160e0fd62122860bd17 (diff)
downloadmisc-67a65895e02fd6d3211218e3ab53732df01f7e3b.zip
misc-67a65895e02fd6d3211218e3ab53732df01f7e3b.tar.gz
misc-67a65895e02fd6d3211218e3ab53732df01f7e3b.tar.bz2
meme/marker.c (marker_load_file): allow whitespace in text (use %m[^\n])
Diffstat (limited to 'meme/marker.c')
-rw-r--r--meme/marker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/meme/marker.c b/meme/marker.c
index 98c68aa..31f9e95 100644
--- a/meme/marker.c
+++ b/meme/marker.c
@@ -78,10 +78,10 @@ static void marker_load_file(struct marker *marker, FILE *file,
lineno++;
if (*buf == '#')
continue;
- n = sscanf(buf, "%lf %lf %lf %lf %ms\n",
+ n = sscanf(buf, "%lf %lf %lf %lf %m[^\n]",
&xa, &ya, &xb, &yb, &s);
if (n != 5)
- n = sscanf(buf, "%lf %lf %ms\n", &xa, &ya, &s);
+ n = sscanf(buf, "%lf %lf %m[^\n]\n", &xa, &ya, &s);
switch (n) {
case -1:
continue;