commit 2ee7a1617da227c67adc2ff859a439e2bc5abf7e parent 5fbf5dbc3eec9722cbbac88d60cd09a75ec50c0b Author: Jan Pobříslo <ccx@te2000.cz> Date: Wed, 2 Nov 2022 02:23:35 +0100 Fix counting and error handling when sorting bundles Diffstat:
M | rc-common.aat | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/rc-common.aat b/rc-common.aat @@ -84,10 +84,11 @@ m755 | } | close(command) | n = 0 -| while((getline bundle_names[++n] < sort_tmpfile) > 0) { } +| while((getline bundle_names[n+1] < sort_tmpfile) > 0) { n++ } | close(sort_tmpfile) | if(n != bundle_count) { -| print "FATAL: error sorting bundles" >"/dev/stderr" +| print "FATAL: error sorting bundles (had "bundle_count", got "n")" >"/dev/stderr" +| exit 1 | } | } | for(n=1; n<=bundle_count; n++) {