Skip to content

Commit

Permalink
Merge pull request #20 from cizo2000/master
Browse files Browse the repository at this point in the history
Fixed warnings about long int during compilation
  • Loading branch information
z00m128 authored Jan 9, 2019
2 parents 0a18005 + e37e169 commit 2709f54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sjasm/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ char* getinstr(char*& p) {
int check8(aint val, bool error) {
if ((val < -256 || val > 255) && error) {
char buffer[32];
sprintf(buffer, "Bytes lost (0x%X)", val);
sprintf(buffer, "Bytes lost (0x%lX)", val);
Warning(buffer, 0, LASTPASS);
return 0;
}
Expand All @@ -270,7 +270,7 @@ int check8(aint val, bool error) {
int check8o(long val) {
if (val < -128 || val > 127) {
char buffer[32];
sprintf(buffer,"Offset out of range (%+i)", val);
sprintf(buffer,"Offset out of range (%+li)", val);
Error(buffer, 0, LASTPASS);
return 0;
}
Expand All @@ -281,7 +281,7 @@ int check8o(long val) {
int check16(aint val, bool error) {
if ((val < -65536 || val > 65535) && error) {
char buffer[32];
sprintf(buffer, "Bytes lost (0x%X)", val);
sprintf(buffer, "Bytes lost (0x%lX)", val);
Warning(buffer, 0, LASTPASS);
return 0;
}
Expand All @@ -292,7 +292,7 @@ int check16(aint val, bool error) {
int check24(aint val, bool error) {
if ((val < -16777216 || val > 16777215) && error) {
char buffer[32];
sprintf(buffer, "Bytes lost (0x%X)", val);
sprintf(buffer, "Bytes lost (0x%lX)", val);
Warning(buffer, 0, LASTPASS);
return 0;
}
Expand Down

0 comments on commit 2709f54

Please sign in to comment.