From a552fa758f13b29953eb44720f8ec10e13718b89 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 8 Mar 2018 16:52:20 +0200 Subject: stack: Use unsigned char type --- src/escpos/stack.rl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/escpos') diff --git a/src/escpos/stack.rl b/src/escpos/stack.rl index a051318..5145782 100644 --- a/src/escpos/stack.rl +++ b/src/escpos/stack.rl @@ -57,6 +57,7 @@ stack_get_num(const struct stack *stack) %%{ machine escpos_stack; + alphtype unsigned char; action stack_num { const char *byte = (char*)stack.var.buf.mem.data + stack.var.offset; @@ -85,8 +86,8 @@ stack_get_num(const struct stack *stack) } NUL = 0x00; - TEXT = 32..127; + TEXT = (32..244 - 192..193); - stack_num = -128..127 >begin_num $store %stack_num; + stack_num = 0..255 >begin_num $store %stack_num; stack_str = TEXT* $store >begin_str :>> NUL %stack_str; }%% -- cgit v1.2.3-70-g09d2