mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use correct length type for Abs*Group
This commit is contained in:
@@ -61,9 +61,9 @@ void sect_EndUnion(void);
|
||||
void sect_CheckUnionClosed(void);
|
||||
|
||||
void sect_AbsByte(uint8_t b);
|
||||
void sect_AbsByteGroup(uint8_t const *s, uint32_t length);
|
||||
void sect_AbsWordGroup(uint8_t const *s, uint32_t length);
|
||||
void sect_AbsLongGroup(uint8_t const *s, uint32_t length);
|
||||
void sect_AbsByteGroup(uint8_t const *s, size_t length);
|
||||
void sect_AbsWordGroup(uint8_t const *s, size_t length);
|
||||
void sect_AbsLongGroup(uint8_t const *s, size_t length);
|
||||
void sect_Skip(uint32_t skip, bool ds);
|
||||
void sect_String(char const *s);
|
||||
void sect_RelByte(struct Expression *expr, uint32_t pcShift);
|
||||
|
||||
@@ -1344,7 +1344,7 @@ constlist_8bit_entry : reloc_8bit_no_str {
|
||||
}
|
||||
| string {
|
||||
uint8_t *output = malloc(strlen($1)); /* Cannot be larger than that */
|
||||
uint32_t length = charmap_Convert($1, output);
|
||||
size_t length = charmap_Convert($1, output);
|
||||
|
||||
sect_AbsByteGroup(output, length);
|
||||
free(output);
|
||||
@@ -1360,7 +1360,7 @@ constlist_16bit_entry : reloc_16bit_no_str {
|
||||
}
|
||||
| string {
|
||||
uint8_t *output = malloc(strlen($1)); /* Cannot be larger than that */
|
||||
uint32_t length = charmap_Convert($1, output);
|
||||
size_t length = charmap_Convert($1, output);
|
||||
|
||||
sect_AbsWordGroup(output, length);
|
||||
free(output);
|
||||
@@ -1377,7 +1377,7 @@ constlist_32bit_entry : relocexpr_no_str {
|
||||
| string {
|
||||
// Charmaps cannot increase the length of a string
|
||||
uint8_t *output = malloc(strlen($1));
|
||||
uint32_t length = charmap_Convert($1, output);
|
||||
size_t length = charmap_Convert($1, output);
|
||||
|
||||
sect_AbsLongGroup(output, length);
|
||||
free(output);
|
||||
|
||||
@@ -628,7 +628,7 @@ void sect_AbsByte(uint8_t b)
|
||||
writebyte(b);
|
||||
}
|
||||
|
||||
void sect_AbsByteGroup(uint8_t const *s, uint32_t length)
|
||||
void sect_AbsByteGroup(uint8_t const *s, size_t length)
|
||||
{
|
||||
if (!checkcodesection())
|
||||
return;
|
||||
@@ -639,7 +639,7 @@ void sect_AbsByteGroup(uint8_t const *s, uint32_t length)
|
||||
writebyte(*s++);
|
||||
}
|
||||
|
||||
void sect_AbsWordGroup(uint8_t const *s, uint32_t length)
|
||||
void sect_AbsWordGroup(uint8_t const *s, size_t length)
|
||||
{
|
||||
if (!checkcodesection())
|
||||
return;
|
||||
@@ -650,7 +650,7 @@ void sect_AbsWordGroup(uint8_t const *s, uint32_t length)
|
||||
writeword(*s++);
|
||||
}
|
||||
|
||||
void sect_AbsLongGroup(uint8_t const *s, uint32_t length)
|
||||
void sect_AbsLongGroup(uint8_t const *s, size_t length)
|
||||
{
|
||||
if (!checkcodesection())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user