Implemented tildearrow's suggestions

This commit is contained in:
techmetx11 2024-04-14 23:21:18 +01:00
parent 08f2216d50
commit 6be1dbdf5e
No known key found for this signature in database
GPG key ID: 20E0C88A0E7E5AF2

View file

@ -138,7 +138,12 @@ public:
String ret;
ret.reserve(l);
while (l--) {
ret += readC();
unsigned char byte=readC();
if (!byte) {
skip(l);
break;
}
ret += byte;
}
return ret;
}
@ -562,7 +567,7 @@ bool DivEngine::loadTFMv1(unsigned char* file, size_t len) {
unsigned char patLens[256];
int maxPatLen=0;
reader.read(patLens, 256);
for (int i=0;i<256;i++) {
for (int i=0; i<256; i++) {
if (patLens[i]==0) {
maxPatLen=256;
break;