$OpenBSD: patch-movelog_c,v 1.1 2002/02/21 00:32:07 naddy Exp $
--- movelog.c.orig	Sat Sep 28 19:46:17 1991
+++ movelog.c	Thu Feb 21 01:26:42 2002
@@ -745,6 +745,7 @@ char	*fname;
 FILE	*fp;
 char	buf[1024], buf2[1024];
 char	*dp;
+int	c;
 
 	fname = remove_newlines(fname);
 	if ((fp = fopen(fname, "r")) == NULL)	{
@@ -756,7 +757,8 @@ char	*dp;
 
 	/* read card string */
 	dp = buf;
-	while ((*dp = (char)fgetc(fp)) != EOF)	{
+	while ((c = fgetc(fp)) != EOF)	{
+		*dp = c;
 		if (*dp == '\n')	/* ignore any CR */
 			continue;
 		if (*dp == '.')
@@ -767,7 +769,8 @@ char	*dp;
 
 	/* read moves string */
 	dp = buf2;
-	while ((*dp = (char)fgetc(fp)) != EOF)	{
+	while ((c = fgetc(fp)) != EOF)	{
+		*dp = c;
 		if (*dp == '\n')	/* ignore any CR */
 			continue;
 		if (*dp == '.')
