Fix issue for get_word:

the separators need to be skipped first.
This commit is contained in:
Patrick Pelissier committed 2018-06-29 19:40:35 +02:00
1 parent 0fda117ffe
commit 817724ce39
2 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -409,7 +409,7 @@ static void test0(void)
string_init(s1);
f = fopen("a-mstring.dat", "wt");
assert(f != NULL);
fprintf(f, "hello world.\n\tHowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww do you do?");
fprintf(f, "hello world...\n\tHowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww do you do?");
fclose(f);
f = fopen("a-mstring.dat", "rt");
b = string_fget_word(s1, " \t.\n?", f);