Skip to content
Snippets Groups Projects
Commit e0597d49 authored by Pierre Loic Garoche's avatar Pierre Loic Garoche
Browse files

_Bool are unsigned integer. The cast as a _Bool is delayed until the end of the function

parent b7258fa5
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ int ISATTY;
/* Standard Input procedures **************/
_Bool _get_bool(FILE* file, char* n){
char b[512];
_Bool r = 0;
int r = 0;
int s = 1;
char c;
do {
......@@ -23,7 +23,7 @@ _Bool _get_bool(FILE* file, char* n){
if((c == '1') || (c == 't') || (c == 'T')) r = 1;
} while((s != 1) || (r == -1));
fprintf(file, "%i\n",r);
return r;
return (_Bool)r;
}
int _get_int(FILE* file, char* n){
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment