2048.c icon indicating copy to clipboard operation
2048.c copied to clipboard

src: apply some fixes

Open VoltrexKeyva opened this issue 2 years ago • 0 comments

  • Use the %u format specifier for printing uint32_t.
  • Cast the right-hand side of the condition of the for loop to uint8_t where it was implicitly promoted to int.
  • Use int variable for getchar() since it can return EOF (-1) to indicate an error, char cannot hold negative integers.
  • Use EOF instead of -1 to be idiomatic.

VoltrexKeyva avatar Dec 01 '23 23:12 VoltrexKeyva