X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdissect-sysfile.c;h=7ae92bfc57c575939b8865ac1c5b09f2c2422a7c;hb=5bfbebe93fba98a3b5c1f64482823d53265aed5b;hp=444c15cc88bbec3544c017422aecb11b7b700bb3;hpb=b7da2544e1d967b9c3afff6cc93686ddeef09b59;p=pspp-builds.git diff --git a/tests/dissect-sysfile.c b/tests/dissect-sysfile.c index 444c15cc..7ae92bfc 100644 --- a/tests/dissect-sysfile.c +++ b/tests/dissect-sysfile.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1202,7 +1202,7 @@ text_tokenize (struct text_record *text, int delimiter) && text->buffer[text->pos] != delimiter && text->buffer[text->pos] != '\0') text->pos++; - if (text->pos == text->size) + if (start == text->pos) return NULL; text->buffer[text->pos++] = '\0'; return &text->buffer[start];