From c5bf0eb2d41b437999394486dc4d7eace5dc0c27 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Sun, 24 Jan 2010 11:32:03 +1000 Subject: Bug fixes, documentation updates jimsh - retry on EINTR from fgets() Fix 0 -> NULL for 64 bit systems Fix overlapping memcpy Fix jim array dereferencing bug *: Counting of parentheses was incorrect with nested array references *: The result for array dereference wasn't being used properly Add os.uptime command Documentation: autogenerated command index Fix gets when last line has no newline --- jim-exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'jim-exec.c') diff --git a/jim-exec.c b/jim-exec.c index 40abe34..879713d 100644 --- a/jim-exec.c +++ b/jim-exec.c @@ -277,7 +277,9 @@ JimWaitPids(int numPids, int *pidPtr, int *statusPtr) *statusPtr = *((int *) &waitPtr->status); pid = waitPtr->pid; if (WIFEXITED(waitPtr->status) || WIFSIGNALED(waitPtr->status)) { - *waitPtr = waitTable[waitTableUsed-1]; + if (waitPtr != &waitTable[waitTableUsed-1]) { + *waitPtr = waitTable[waitTableUsed-1]; + } waitTableUsed--; } else { -- cgit v1.1