Browse Source

ensure translations are null-terminated

pull/1691/head
John Törnblom 5 years ago committed by Anders Jenbo
parent
commit
0be36898b9
  1. 2
      Source/utils/language.cpp

2
Source/utils/language.cpp

@ -41,7 +41,7 @@ char *read_entry(FILE *fp, mo_entry *e)
return nullptr;
}
if (!(data = calloc(e->length, sizeof(char)))) {
if (!(data = calloc(e->length + 1, sizeof(char)))) {
return nullptr;
}

Loading…
Cancel
Save