From 6017fe6e4bbe7852451ce2e717ff4c665a270f44 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 20 Oct 2011 22:29:54 +0800 Subject: [PATCH] Kernel/vterm - Removed an unneeded divide --- Kernel/drv/vterm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index ea184ee1..1be52ac1 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -468,7 +468,8 @@ Uint64 VT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) ((char*)Buffer)[pos] = term->InputBuffer[term->InputRead]; pos ++; term->InputRead ++; - term->InputRead %= MAX_INPUT_CHARS8; + while(term->InputRead > MAX_INPUT_CHARS8) + term->InputRead -= MAX_INPUT_CHARS8; } break; @@ -491,7 +492,8 @@ Uint64 VT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer) codepoint_buf[pos] = codepoint_in[term->InputRead]; pos ++; term->InputRead ++; - term->InputRead %= MAX_INPUT_CHARS32; + while(term->InputRead > MAX_INPUT_CHARS32) + term->InputRead -= MAX_INPUT_CHARS32; } pos *= 4; break; -- 2.20.1