Merge pull request #9 from ksherlock/patch_12

fix for fixed-size labels
This commit is contained in:
MikeW50 2018-03-25 15:28:14 -06:00 committed by GitHub
commit bf2446df16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,10 +443,17 @@ disp = nam_disp-sizeof(header); /* skip any extra stuff */
if (disp)
for (i = 0; i < disp; ++i)
fgetc(f);
for (i = 0; i < 10; ++i) /* read the load segment name */
if (version == 0)
loadname[0] = 0;
else {
for (i = 0; i < 10; ++i) /* read the load segment name */
loadname[i] = fgetc(f);
loadname[10] = (char) 0;
len = fgetc(f); /* read the code segment name */
loadname[10] = (char) 0;
}
len = lablen;
if (!len)
len = fgetc(f); /* read the code segment name */
for (i = 0; i < len; ++i)
segname[i] = fgetc(f);
segname[len] = (char) 0;