diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-07 06:27:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-07 06:27:10 -0700 |
commit | 39f620152808fb3e8aedd4386b96491cc18331b8 (patch) | |
tree | 20b3608756f14a8145ec9aa54c4c88053a9d32b1 | |
parent | 16b390a2d811bb0dbe6f8d8bf1cf21cb397d3447 (diff) | |
download | txr-39f620152808fb3e8aedd4386b96491cc18331b8.tar.gz txr-39f620152808fb3e8aedd4386b96491cc18331b8.tar.bz2 txr-39f620152808fb3e8aedd4386b96491cc18331b8.zip |
args: correction in assertion.
* args.c (args_normalize_least): The bug_unless here should be
checking that minfill is not beyond argc->argc. That's the
situation that would cause the loop to overflow the fixed
argument argument storage in args indicated by args->argc.
-rw-r--r-- | args.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ void args_normalize_exact(struct args *args, cnum fill) void args_normalize_least(struct args *args, cnum minfill) { - bug_unless (args->fill <= args->argc); + bug_unless (minfill <= args->argc); while (args->fill < minfill && args->list) args_add(args, pop(&args->list)); |