diff options
Diffstat (limited to '')
-rw-r--r-- | file.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2311,8 +2311,12 @@ push_link(int cmd, int offset, int pos) struct link_stack *p; p = New(struct link_stack); p->cmd = cmd; - p->offset = offset; - p->pos = pos; + p->offset = (short)offset; + if (p->offset < 0) + p->offset = 0; + p->pos = (short)pos; + if (p->pos < 0) + p->pos = 0; p->next = link_stack; link_stack = p; } |