X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Flogin_src%2Fmain.c;h=456974fcafe83d72ed414daee6428566b63b9cf8;hb=b98fbd4e9c71447d81fc9bd643fb174c76346e0f;hp=cf58c1b29bc42aee24f755a6cb06fa2a50c72b15;hpb=cea789b7006552c5365744d4ebaddbdc96387355;p=tpg%2Facess2.git diff --git a/Usermode/Applications/login_src/main.c b/Usermode/Applications/login_src/main.c index cf58c1b2..456974fc 100644 --- a/Usermode/Applications/login_src/main.c +++ b/Usermode/Applications/login_src/main.c @@ -87,7 +87,7 @@ char *GetUsername() while( (ch = fgetc(stdin)) != -1 && ch != '\n' ) { if(ch == '\b') { - if( pos == 0 ) continue; + if( pos <= 0 ) continue; pos --; ret[pos] = '\0'; } @@ -123,7 +123,7 @@ char *GetPassword() while( (ch = fgetc(stdin)) != -1 && ch != '\n' ) { if(ch == '\b') { - if( pos == 0 ) continue; + if( pos <= 0 ) continue; pos --; ret[pos] = '\0'; }