3 ms·
Very cool and nostalgic! Had no idea the PS1 look was trending. Also, due to Stack Overflow conditioning: fgetc() does not return 'char', it returns 'int' else
by unwind 4y ago
Very cool and nostalgic! Had no idea the PS1 look was trending.
Also, due to Stack Overflow conditioning: fgetc() does not return 'char', it returns 'int' else EOF won't fit.
- st_goliath 4y ago> fgetc() does not return 'char', it returns 'int' else EOF won't fit. Or more precisely: don't store the return value in a 'char' and check if it is EOF. On some platforms (e.g. gcc ARM eabi), regular 'char' is unsigned and the check fails.