diff --git a/src/cx16-smc.c b/src/cx16-smc.c index 900bc60..258111a 100644 --- a/src/cx16-smc.c +++ b/src/cx16-smc.c @@ -74,7 +74,7 @@ unsigned int smc_detect() { */ unsigned long smc_get_version_text(unsigned char* version_string, unsigned char release, unsigned char major, unsigned char minor) { - sprintf(version_string, "%u.%u.%u ", release, major, minor); + sprintf(version_string, "%u.%u.%u", release, major, minor); return MAKELONG(MAKEWORD(minor, major), MAKEWORD(0, release)); } @@ -301,7 +301,7 @@ unsigned int smc_flash(unsigned int smc_bytes_total) { if(smc_attempts_flashed >= 10) { sprintf(info_text, "There were too many attempts trying to flash the SMC at location %04x", smc_bytes_flashed); display_action_text(info_text); - return 0xFFFFFFFF; + return (unsigned int)0xFFFF; } } diff --git a/src/cx16-update.c b/src/cx16-update.c index 69061df..21895a0 100644 --- a/src/cx16-update.c +++ b/src/cx16-update.c @@ -352,12 +352,12 @@ void main() { // Flash the SMC chip. display_action_text("Press both POWER/RESET buttons on the CX16 board!"); display_info_smc(STATUS_FLASHING, "Press POWER/RESET!"); - unsigned long flashed_bytes = smc_flash(smc_file_size); + unsigned int flashed_bytes = smc_flash(smc_file_size); if(flashed_bytes) { // SF-1 | and POWER/RESET pressed display_info_smc(STATUS_FLASHED, ""); } else { - if(flashed_bytes == (unsigned long)0xFFFFFFFF) { + if(flashed_bytes == (unsigned int)0xFFFF) { // SF-3 | errors during flash display_info_smc(STATUS_ERROR, "SMC has errors!"); } else {