summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/fileio.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/fileio.cc')
-rw-r--r--Build/source/utils/asymptote/fileio.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/Build/source/utils/asymptote/fileio.cc b/Build/source/utils/asymptote/fileio.cc
index 42eeefc27c6..13a2e2b27ff 100644
--- a/Build/source/utils/asymptote/fileio.cc
+++ b/Build/source/utils/asymptote/fileio.cc
@@ -111,6 +111,8 @@ void ifile::Read(string& val)
if(comment && c == comment) {
while((c=stream->peek()) != '\n' && c != EOF)
stream->ignore();
+ if(wordmode && !linemode)
+ while(isspace(stream->peek())) stream->ignore();
if(s.empty() && c == '\n') {
stream->ignore();
continue;
@@ -118,8 +120,10 @@ void ifile::Read(string& val)
}
if(csvmode && (c == ',' || c == '\n'))
break;
- if(wordmode && isspace(c))
+ if(wordmode && isspace(c)) {
+ if(!linemode) while(isspace(stream->peek())) stream->ignore();
break;
+ }
}
s += (char) stream->get();
}