projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check for negatives in cursor address sequence
[unix-history]
/
usr
/
src
/
usr.bin
/
window
/
wwwrite.c
diff --git
a/usr/src/usr.bin/window/wwwrite.c
b/usr/src/usr.bin/window/wwwrite.c
index
80465dc
..
16d1400
100644
(file)
--- a/
usr/src/usr.bin/window/wwwrite.c
+++ b/
usr/src/usr.bin/window/wwwrite.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char *sccsid = "@(#)wwwrite.c 3.1
4 83/12/02
";
+static char *sccsid = "@(#)wwwrite.c 3.1
5 83/12/06
";
#endif
#include "ww.h"
#endif
#include "ww.h"
@@
-185,11
+185,13
@@
int n;
}
break;
case 2:
}
break;
case 2:
- w->ww_cur.r = w->ww_w.t + (*p++ - ' ') % w->ww_w.nr;
+ w->ww_cur.r = w->ww_w.t +
+ (unsigned)(*p++ - ' ') % w->ww_w.nr;
w->ww_wstate = 3;
break;
case 3:
w->ww_wstate = 3;
break;
case 3:
- w->ww_cur.c = w->ww_w.l + (*p++ - ' ') % w->ww_w.nc;
+ w->ww_cur.c = w->ww_w.l +
+ (unsigned)(*p++ - ' ') % w->ww_w.nc;
w->ww_wstate = 0;
break;
}
w->ww_wstate = 0;
break;
}