summaryrefslogtreecommitdiffhomepage
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-06-02 03:21:42 +0000
committerEric Andersen <andersen@codepoet.org>2000-06-02 03:21:42 +0000
commit86ab8a32bd63b2f2a73bdcead8e2bb037589e175 (patch)
tree10aa90962757d07724c78e4fc9baaa27ca7b4858 /utility.c
parent4062268bc7ac748e2ea2e569aa862b2b3f8a2db2 (diff)
A number of additional fixed from Pavel Roskin, note some more bugs in the
TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox, which is now included. -Erik
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utility.c b/utility.c
index 07e540e22..68bdc3197 100644
--- a/utility.c
+++ b/utility.c
@@ -1583,12 +1583,12 @@ cstring_alloc(FILE* f, int depth)
char *cstring;
char buffer[CSTRING_BUFFER_LENGTH];
int target = CSTRING_BUFFER_LENGTH * depth;
- int i, len;
- int size;
+ int c, i, len, size;
/* fill buffer */
i = 0;
- while ((buffer[i] = fgetc(f)) != EOF) {
+ while ((c = fgetc(f)) != EOF) {
+ buffer[i] = (char) c;
if (buffer[i++] == 0x0a) { break; }
if (i == CSTRING_BUFFER_LENGTH) { break; }
}