From e208d152c17e2b8cf0709e75c6488020477e2f51 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Mon, 8 Dec 2003 07:29:16 +0000
Subject: [PATCH] Bugfix: line number in help index must be 16-bits only.

---
 src/uifc/uifc32.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c
index d24b7744f0..e0d996b596 100644
--- a/src/uifc/uifc32.c
+++ b/src/uifc/uifc32.c
@@ -1944,7 +1944,7 @@ static void help(void)
 {
 	char hbuf[HELPBUF_SIZE],str[256];
     char *p;
-	unsigned int line;
+	unsigned short line;	/* This must be 16-bits */
 	long l;
 	FILE *fp;
 
@@ -1968,12 +1968,12 @@ static void help(void)
 				if(!fread(str,12,1,fp))
 					break;
 				str[12]=0;
-				fread(&line,2,1,fp);
+				fread(&line,sizeof(line),1,fp);
 				if(stricmp(str,p) || line!=helpline) {
-					fseek(fp,4,SEEK_CUR);
+					fseek(fp,sizeof(l),SEEK_CUR);
 					continue; 
 				}
-				fread(&l,4,1,fp);
+				fread(&l,sizeof(l),1,fp);
 				break;
 			}
 			fclose(fp);
-- 
GitLab