From e1a4c3ed28ced5f4fd2b8be07d2c2595356d2c26 Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 1 Apr 2013 01:29:47 +0000 Subject: [PATCH] do use val.u on the RHS of a shift --- expr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/expr.c b/expr.c index e3248b5..8a83874 100644 --- a/expr.c +++ b/expr.c @@ -23,7 +23,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.65 2013/04/01 01:16:37 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.66 2013/04/01 01:29:47 tg Exp $"); #if !HAVE_SILENT_IDIVWRAPV #if !defined(MKSH_LEGACY_MODE) || HAVE_LONG_32BIT @@ -503,8 +503,8 @@ evalexpr(Expr_state *es, int prec) * shift-right out of this, and open-coding * it would probably hurt massively. */ - /* how about ANDing? use vr->val.u? */ - res = (mksh_uari_t)(vl->val.i >> vr->val.i); + /* how about ANDing? */ + res = (mksh_uari_t)(vl->val.i >> vr->val.u); } break; /* how about rotation? */