Skip to content

Commit 34ae14c

Browse files
committed
Fix parsing
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17475 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 4a5e40b commit 34ae14c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Parser/BaseModelica_Lexer.g

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,11 @@ STRING : '"' STRING_GUTS '"'
327327
buf[len+0] = '.';
328328
buf[len+1] = '.';
329329
buf[len+2] = '.';
330-
buf[len+3] = '0';
330+
buf[len+3] = '\0';
331+
} else {
332+
buf[len] = '\0';
331333
}
332-
for (i=0;i<=len;i++) {
334+
for (i=0;i<len;i++) {
333335
/* Don't break lines in the printed error-message */
334336
if (res[i] == '\n' || res[i] == '\r') {
335337
buf[i] = ' ';

0 commit comments

Comments
 (0)