1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Correct printing of string-length

Added the cast, as without it, it may fail on systems where size_t is not
long (e.g is long long)

Fixes #85
This commit is contained in:
Nick Patavalis
2018-01-09 13:44:16 +02:00
parent 7e0f1c5e7f
commit eaf579f644

View File

@ -1938,7 +1938,8 @@ parse_args(int argc, char *argv[])
printf("emap is : "); print_map(opts.emap);
printf("logfile is : %s\n", opts.log_filename ? opts.log_filename : "none");
if ( opts.initstring ) {
printf("initstring len : %ld bytes\n", strlen(opts.initstring));
printf("initstring len : %lu bytes\n",
(unsigned long)strlen(opts.initstring));
} else {
printf("initstring : none\n");
}