Commit 6e197f37 authored by Michael Tremer's avatar Michael Tremer

country: Fix SEGV when accessing the string pool

This was caused because I am too stupid to count to two.
Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 126cb18a
......@@ -137,15 +137,12 @@ int loc_country_new_from_database_v0(struct loc_ctx* ctx, struct loc_stringpool*
goto FAIL;
// Set name
#if 0
// XXX Reading from the stringpool makes test-country.c fail
const char* name = loc_stringpool_get(pool, be32toh(dbobj->name));
if (name) {
r = loc_country_set_name(*country, name);
if (r)
goto FAIL;
}
#endif
return 0;
......
......@@ -49,7 +49,7 @@ static inline void loc_country_copy_code(char* dst, const char* src) {
}
// Terminate the string
dst[3] = '\0';
dst[2] = '\0';
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment