diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-03-08 16:52:20 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-03-08 16:52:20 +0200 |
commit | a552fa758f13b29953eb44720f8ec10e13718b89 (patch) | |
tree | 1835db6ae19525e6b0cdac46fb5eae0ce5bb716b | |
parent | f54e7e8c2aeb4fafebf0d5bd5570b060462c9ecf (diff) |
stack: Use unsigned char type
-rw-r--r-- | src/escpos/stack.rl | 5 |
1 files changed, 3 insertions, 2 deletions
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; }%% |