fix crash when incompatible tag is null (#299)

* rerun autogen

* give clients access to mod incompatible tags

And fix a crash when warping to the cake end picture

* whoops
This commit is contained in:
Isaac0-dev 2023-02-28 22:52:47 +10:00 committed by GitHub
parent 2927425025
commit a22f930d27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,8 +52,11 @@ void network_send_mod_list(void) {
u16 nameLength = strlen(mod->name);
if (nameLength > 31) { nameLength = 31; }
u16 incompatibleLength = strlen(mod->incompatible);
if (incompatibleLength > 31) { incompatibleLength = 31; }
u16 incompatibleLength = 0;
if (mod->incompatible) {
incompatibleLength = strlen(mod->incompatible);
if (incompatibleLength > 31) { incompatibleLength = 31; }
}
u16 relativePathLength = strlen(mod->relativePath);
u64 modSize = mod->size;