Mercurial > hg > toybox
changeset 1274:c47218ccbfdf draft
Fix bug reported by Ashwini Sharma: rebound has to be at the end or toy_init() doesn't zero the rest of the struct.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 05 May 2014 21:20:11 -0500 |
parents | 79e847fec774 |
children | 6f18a0845db3 |
files | toys.h |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/toys.h Fri May 02 06:24:11 2014 -0500 +++ b/toys.h Mon May 05 21:20:11 2014 -0500 @@ -119,13 +119,15 @@ struct toy_list *which; // Which entry in toy_list is this one? char **argv; // Original command line arguments char **optargs; // Arguments left over from get_optflags() - jmp_buf *rebound; // longjmp here instead of exit when do_rebound set unsigned optflags; // Command line option flags from get_optflags() int exitval; // Value error_exit feeds to exit() int optc; // Count of optargs int exithelp; // Should error_exit print a usage message first? int old_umask; // Old umask preserved by TOYFLAG_UMASK int toycount; // Total number of commands in this build + + // This is at the end so toy_init() doesn't zero it. + jmp_buf *rebound; // longjmp here instead of exit when do_rebound set } toys; // Two big temporary buffers: one for use by commands, one for library functions