Commit fe8c5a77 authored by rswindell's avatar rswindell
Browse files

Help index is read as a short.

parent bec1b9a9
......@@ -1664,6 +1664,7 @@ void help()
,hbuf[HELPBUF_SIZE],str[256];
char *p;
uint i,j,k,len;
ushort line;
long l;
FILE *fp;
#ifndef __FLAT__
......@@ -1757,8 +1758,8 @@ void help()
if(!fread(str,12,1,fp))
break;
str[12]=0;
fread(&k,2,1,fp);
if(stricmp(str,p) || k!=helpline) {
fread(&line,2,1,fp);
if(stricmp(str,p) || line!=helpline) {
fseek(fp,4,SEEK_CUR);
continue; }
fread(&l,4,1,fp);
......
......@@ -298,7 +298,7 @@ void help()
{
char hbuf[HELPBUF_SIZE],str[256];
char *p;
uint i,j,k,len;
ushort line;
long l;
FILE *fp;
......@@ -320,8 +320,8 @@ void help()
if(!fread(str,12,1,fp))
break;
str[12]=0;
fread(&k,2,1,fp);
if(stricmp(str,p) || k!=helpline) {
fread(&line,2,1,fp);
if(stricmp(str,p) || line!=helpline) {
fseek(fp,4,SEEK_CUR);
continue; }
fread(&l,4,1,fp);
......@@ -337,7 +337,11 @@ void help()
else {
fseek(fp,l,SEEK_SET);
fread(hbuf,HELPBUF_SIZE,1,fp);
fclose(fp); } } } }
fclose(fp);
}
}
}
}
else
strcpy(hbuf,api->helpbuf);
......
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