Hacker News new | ask | show | jobs
by unwind 1420 days 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.

1 comments

> 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.