diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-09-27 20:11:10 +0200 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-09-27 20:11:10 +0200 |
| commit | 0e3278a087daa25cba541d7c1dae19dfd4e2d422 (patch) | |
| tree | dbd8ea7b2f3398865a396d3f425a6ab4ba4bed94 /libpsn00b/lzp/crc.c | |
| parent | 5bc36dfcfc64e48401a9c6472062020681b3511f (diff) | |
| download | psn00bsdk-0e3278a087daa25cba541d7c1dae19dfd4e2d422.tar.gz | |
Misc MSVC/CMake fixes, also fixed childexec example
Diffstat (limited to 'libpsn00b/lzp/crc.c')
| -rw-r--r-- | libpsn00b/lzp/crc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpsn00b/lzp/crc.c b/libpsn00b/lzp/crc.c index c5ab702..7cc7bf3 100644 --- a/libpsn00b/lzp/crc.c +++ b/libpsn00b/lzp/crc.c @@ -49,7 +49,7 @@ void initTable32(unsigned int* table) { } -unsigned short lzCRC16(void* buff, int bytes, unsigned short crc) { +unsigned short lzCRC16(const void* buff, int bytes, unsigned short crc) { int i; unsigned short tmp, short_c; @@ -59,7 +59,7 @@ unsigned short lzCRC16(void* buff, int bytes, unsigned short crc) { for(i=0; i<bytes; i++) { - short_c = 0x00ff & (unsigned short)((unsigned char*)buff)[i]; + short_c = 0x00ff & (unsigned short)((const unsigned char*)buff)[i]; tmp = crc ^ short_c; crc = (crc >> 8) ^ crcTable[tmp&0xff]; @@ -70,10 +70,10 @@ unsigned short lzCRC16(void* buff, int bytes, unsigned short crc) { } -unsigned int lzCRC32(void* buff, int bytes, unsigned int crc) { +unsigned int lzCRC32(const void* buff, int bytes, unsigned int crc) { int i; - unsigned char* byteBuff = (unsigned char*)buff; + unsigned char* byteBuff = (const unsigned char*)buff; unsigned int byte; unsigned int crcTable[256]; |
