summaryrefslogtreecommitdiff
path: root/source/luametatex/source/tex/texinputstack.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/luametatex/source/tex/texinputstack.c')
-rw-r--r--source/luametatex/source/tex/texinputstack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/luametatex/source/tex/texinputstack.c b/source/luametatex/source/tex/texinputstack.c
index 7780c17bc..92a9c8a0c 100644
--- a/source/luametatex/source/tex/texinputstack.c
+++ b/source/luametatex/source/tex/texinputstack.c
@@ -184,8 +184,15 @@ static int tex_aux_room_on_parameter_stack(void) /* quite similar to save_stack
void tex_copy_to_parameter_stack(halfword *pstack, int n)
{
if (tex_aux_room_on_parameter_stack()) {
+if (n == 1) {
+ lmt_input_state.parameter_stack[lmt_input_state.parameter_stack_data.ptr++] = pstack[0];
+//} else if (n == 2) {
+// lmt_input_state.parameter_stack[lmt_input_state.parameter_stack_data.ptr++] = pstack[0];
+// lmt_input_state.parameter_stack[lmt_input_state.parameter_stack_data.ptr++] = pstack[1];
+} else {
memcpy(&lmt_input_state.parameter_stack[lmt_input_state.parameter_stack_data.ptr], pstack, n * sizeof(halfword));
lmt_input_state.parameter_stack_data.ptr += n;
+}
}
}