X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=7365fbf1a7bb3f0b04eb79587cbb2558a7b2ea40;hb=b8c7a6d5ea9e568631cc84e04bf0d8861b6f99ec;hp=cf404f7507f17268e7ab8098ee7cdff0559fcc36;hpb=e5e6dbd7415f1c84d0d0e7cb827e1fb4d7cbe4ad;p=open-adventure.git diff --git a/misc.c b/misc.c index cf404f7..7365fbf 100644 --- a/misc.c +++ b/misc.c @@ -221,8 +221,8 @@ static char* get_input(void) // Print a blank line printf("\n"); - char* input; - while (true) { + char* input = ""; + for (;;) { input = myreadline(input_prompt); if (input == NULL) // Got EOF; return with it.