correcting a very nasty trim bug
This commit is contained in:
parent
134f3170f6
commit
ec27a42dc1
@ -60,12 +60,13 @@ if (NULL==ptr) {
|
||||
fprintf(stderr, "line to short\n");
|
||||
return -6;
|
||||
}
|
||||
if (verbosity) fprintf(stderr, "path [%s]\n", ltrim(rtrim(ptr)));
|
||||
if (strlen(ptr) > SZ_TEXT) {
|
||||
cp = ltrim(rtrim(ptr));
|
||||
if (verbosity) fprintf(stderr, "path [%s]\n", cp);
|
||||
if (strlen(ptr) > SZ_PATH) {
|
||||
fprintf(stderr, "path too long\n");
|
||||
return -5;
|
||||
}
|
||||
strcpy(sref->path, ptr);
|
||||
strcpy(sref->path, cp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -105,7 +106,9 @@ while (NULL != fgets(line, T_LINE, fp)) {
|
||||
|
||||
memset(&sample, 0, sizeof(SampleRef));
|
||||
foo = decode_la_ligne(line, &sample);
|
||||
#if DEBUG_LEVEL
|
||||
fprintf(stderr, "decode la ligne -> %d\n\n", foo);
|
||||
#endif
|
||||
affiche_un_sample(&sample);
|
||||
|
||||
ln++;
|
||||
|
Loading…
Reference in New Issue
Block a user