Overview
Comment: | Add a final terminating null to first message in kcli_usage. This was causing the shared library build to segfault. Not perfect, as if there are no options, there will be two nulls, but two is better than none. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6aeac330cedb6d70e71b74adde2dd98c |
User & Date: | glowpelt on 2020-01-31 05:58:38 |
Other Links: | manifest | tags |
Context
2020-01-31
| ||
06:05 | Merge install script branch. Seems to be Good Enough for now, and shouldn't break anything at all to merge this. check-in: 12a51d9c50 user: glowpelt tags: trunk | |
05:58 | Add a final terminating null to first message in kcli_usage. This was causing the shared library build to segfault. Not perfect, as if there are no options, there will be two nulls, but two is better than none. check-in: 6aeac330ce user: glowpelt tags: trunk | |
2020-01-30
| ||
07:15 | Merge the shared library build fixes into trunk check-in: d49a706cc4 user: glowpelt tags: trunk | |
Changes
Modified mod/kcli/usage.fn.c from [51bd833f89] to [a2f98072f0].
22 22 const char* name = prg.name != null ? 23 23 prg.name : _k_internal_binary_name; 24 24 25 25 const char* msg [] = { 26 26 name, " v", prg.version, "\n\n", 27 27 prg.desc, "\n\n", 28 28 "usage: ", _k_internal_binary_name, 29 - prg.optc == 0 ? null : " [-", 29 + prg.optc == 0 ? null : " [-", null, 30 30 }; 31 31 32 32 if (!kokay(c = ksbufwrite(out, msg))) return c; 33 33 34 34 u8 longest_opt = 0; 35 35 u8 opt_lens [prg.optc]; 36 36 for (sz i = 0; i != prg.optc; ++ i) {