Commit 5ee6b8a4 authored by claes's avatar claes

Fix in bitwshift

parent 97fccaea
/* /*
* Proview $Id: rt_plc_arithm.c,v 1.9 2007-10-30 07:29:48 claes Exp $ * Proview $Id: rt_plc_arithm.c,v 1.10 2007-11-01 15:34:55 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -1196,7 +1196,7 @@ void BwShiftLeft_exec( ...@@ -1196,7 +1196,7 @@ void BwShiftLeft_exec(
plc_sThread *tp, plc_sThread *tp,
pwr_sClass_BwShiftLeft *o) pwr_sClass_BwShiftLeft *o)
{ {
o->Out = (*o->InP) << (*o->NumP); o->Out = ((unsigned int)*o->InP) << (*o->NumP);
} }
/*_* /*_*
...@@ -1207,7 +1207,7 @@ void BwShiftRight_exec( ...@@ -1207,7 +1207,7 @@ void BwShiftRight_exec(
plc_sThread *tp, plc_sThread *tp,
pwr_sClass_BwShiftRight *o) pwr_sClass_BwShiftRight *o)
{ {
o->Out = (*o->InP) >> (*o->NumP); o->Out = ((unsigned int)*o->InP) >> (*o->NumP);
} }
/*_* /*_*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment