diff --git a/src/state.cpp b/src/state.cpp index b6a2f9af..7db233f3 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -125,11 +125,11 @@ static int SubWrite(std::ostream* os, SFORMAT *sf) //Now restore the original byte order. #ifndef LSB_FIRST - if(sf->s&RLSB) + if(sf->s&RLSB) FlipByteOrder(sf->v,sf->s&(~FCEUSTATE_FLAGS)); #endif } - sf++; + sf++; } return(acc); @@ -398,7 +398,7 @@ bool FCEUSS_SaveMS(std::ostream* outstream, int compressionLevel) //worst case compression. //zlib says "0.1% larger than sourceLen plus 12 bytes" comprlen = (len>>9)+12 + len; - cbuf = new uint8[comprlen]; + cbuf = new uint8[comprlen]; error = compress2(cbuf,&comprlen,(uint8*)ms.buf(),len,compressionLevel); } @@ -462,7 +462,6 @@ void FCEUSS_Save(char *fname) bool FCEUSS_LoadFP(std::istream* is, ENUM_SSLOADPARAMS params) { uint8 header[16]; - char* fn=0; FCEUMOV_PreLoad(); @@ -507,7 +506,7 @@ bool FCEUSS_LoadFP(std::istream* is, ENUM_SSLOADPARAMS params) if(x) { FCEUPPU_LoadState(stateversion); - FCEUSND_LoadState(stateversion); + FCEUSND_LoadState(stateversion); x=FCEUMOV_PostLoad(); } @@ -568,7 +567,7 @@ bool FCEUSS_Load(char *fname) } delete st; return true; - } + } else { if(!fname) @@ -662,7 +661,7 @@ int FCEUI_SelectState(int w, int show) FCEU_DispMessage("-select state-"); } return oldstate; -} +} void FCEUI_SaveState(char *fname) { @@ -699,7 +698,7 @@ void FCEUI_LoadState(char *fname) if(FCEUSS_SaveFP(fp,0)) { fclose(fp); - FCEUNET_SendFile(FCEUNPCMD_LOADSTATE, fn); + FCEUNET_SendFile(FCEUNPCMD_LOADSTATE, fn); } else { diff --git a/src/utils/guid.cpp b/src/utils/guid.cpp index 7c9dc8cd..409ac61a 100644 --- a/src/utils/guid.cpp +++ b/src/utils/guid.cpp @@ -44,4 +44,4 @@ void FCEU_Guid::scan(std::string& str) endptr++; for(int i=0;i<6;i++) data[10+i] = hexToByte(&endptr); -} \ No newline at end of file +} diff --git a/src/utils/xstring.h b/src/utils/xstring.h index d2e2de12..2a355885 100644 --- a/src/utils/xstring.h +++ b/src/utils/xstring.h @@ -26,10 +26,10 @@ #include "../types.h" //definitions for str_strip() flags -#define STRIP_SP 0x01 // space -#define STRIP_TAB 0x02 // tab -#define STRIP_CR 0x04 // carriage return -#define STRIP_LF 0x08 // line feed +#define STRIP_SP 0x01 // space +#define STRIP_TAB 0x02 // tab +#define STRIP_CR 0x04 // carriage return +#define STRIP_LF 0x08 // line feed int str_ucase(char *str); @@ -58,4 +58,4 @@ char *U16ToHexStr(uint16 a); std::string stditoa(int n); //extracts a decimal uint from an istream -unsigned int uintDecFromIstream(std::istream* is); \ No newline at end of file +unsigned int uintDecFromIstream(std::istream* is); diff --git a/src/x6502abbrev.h b/src/x6502abbrev.h index 89431c93..d30e69f9 100644 --- a/src/x6502abbrev.h +++ b/src/x6502abbrev.h @@ -17,4 +17,4 @@ #define _jammed X.jammed -#endif \ No newline at end of file +#endif