summaryrefslogtreecommitdiff
blob: 7cbd7f436f577880b57618a68c693559259450c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 xwin.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/xwin.c b/xwin.c
index f395909..092edff 100644
--- a/xwin.c
+++ b/xwin.c
@@ -13552,7 +13552,7 @@ void NewActiveStruct()
 #ifdef CRAY
     _fcd ztr;
 #else
-    char ztr;
+    char ztr[4];
 #endif
 #endif
 
@@ -13650,8 +13650,10 @@ void NewActiveStruct()
 */
 	clfpstr->ihashz = 0;
 #else
-	strncpy(&ztr,HetAtm[j],3);
-	parhet_(&j1,&ztr);
+	if (HetAtm[j] != NULL) {
+	   strncpy(ztr,HetAtm[j],3);
+	   parhet_(&j1,ztr);
+	}
 #endif
 #endif
     }
@@ -27353,7 +27355,7 @@ char *errstr;
 	UpdateZME();
 	RedrawScroll(&zscroll);
     }
-    strcpy(ZMEerr,errstr);
+    strncpy(ZMEerr,errstr,MAXZMEERR);
     RedrawStatus();
 }