summaryrefslogtreecommitdiff
path: root/src/tblcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tblcmp.c')
-rw-r--r--src/tblcmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tblcmp.c b/src/tblcmp.c
index b0dc8b3..81dfbc1 100644
--- a/src/tblcmp.c
+++ b/src/tblcmp.c
@@ -420,7 +420,7 @@ void inittbl (void)
{
int i;
- memset(chk, 0, current_max_xpairs * sizeof(int));
+ memset(chk, 0, (size_t) current_max_xpairs * sizeof(int));
tblend = 0;
firstfree = tblend + 1;
@@ -703,7 +703,8 @@ void mktemplate (int state[], int statenum, int comstate)
if (state[i] == 0)
tnxt[tmpbase + i] = 0;
else {
- transset[tsptr++] = i;
+ /* Note: range 1..256 is mapped to 1..255,0 */
+ transset[tsptr++] = (unsigned char) i;
tnxt[tmpbase + i] = comstate;
}