mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-01 16:10:39 +00:00
Fix return types and results
- return type is uint32_t in C/C++ and ULONGTYPE in QB64 - adler32 must return one (1) on an empty input
This commit is contained in:
parent
a84e174b63
commit
6b3842673f
|
@ -8,13 +8,13 @@
|
|||
#include "miniz.h"
|
||||
|
||||
uint32_t func__adler32(qbs *text) {
|
||||
if (!text->len) return 0;
|
||||
return (uint32) adler32(1, text->chr, text->len);
|
||||
if (!text->len) return 1;
|
||||
return (uint32_t) adler32(1, text->chr, text->len);
|
||||
}
|
||||
|
||||
uint32_t func__crc32(qbs *text) {
|
||||
if (!text->len) return 0;
|
||||
return (uint32) crc32(0, text->chr, text->len);
|
||||
return (uint32_t) crc32(0, text->chr, text->len);
|
||||
}
|
||||
|
||||
qbs *func__deflate(qbs *text) {
|
||||
|
|
|
@ -3833,7 +3833,7 @@ id.subfunc = 1
|
|||
id.callname = "func__adler32"
|
||||
id.args = 1
|
||||
id.arg = MKL$(STRINGTYPE - ISPOINTER)
|
||||
id.ret = LONGTYPE - ISPOINTER
|
||||
id.ret = ULONGTYPE - ISPOINTER
|
||||
id.hr_syntax = "_ADLER32(dataString$)"
|
||||
regid
|
||||
|
||||
|
@ -3844,7 +3844,7 @@ id.subfunc = 1
|
|||
id.callname = "func__crc32"
|
||||
id.args = 1
|
||||
id.arg = MKL$(STRINGTYPE - ISPOINTER)
|
||||
id.ret = LONGTYPE - ISPOINTER
|
||||
id.ret = ULONGTYPE - ISPOINTER
|
||||
id.hr_syntax = "_CRC32(dataString$)"
|
||||
regid
|
||||
|
||||
|
|
Loading…
Reference in a new issue