https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d3b72a070acf11744b906...
commit 2d3b72a070acf11744b906a69bbd14b38040931c Author: Joachim Henze Joachim.Henze@reactos.org AuthorDate: Thu May 30 12:40:54 2019 +0200 Commit: Joachim Henze Joachim.Henze@reactos.org CommitDate: Thu May 30 12:40:54 2019 +0200
[ROSAPPS][PICE] Fix a glitch at two places where code intends to replace invalid chars with spaces ROSAPPS-353
Found by some static code analysis tool reporting 'Condition always false'. The fix is a selective back-port from the more recent version of pICE hardware.c Revision: 1.6, Date: 2004/02/17 23:07:36
The most recent source of pICE atm can be found at https://sourceforge.net/projects/pice/files/pICE%20source/build_20/
Thanks to DougLyons and JIRA user 'maddin200'. --- modules/rosapps/applications/sysutils/utils/pice/module/hardware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/rosapps/applications/sysutils/utils/pice/module/hardware.c b/modules/rosapps/applications/sysutils/utils/pice/module/hardware.c index 0a067fd5a5..65864a0373 100644 --- a/modules/rosapps/applications/sysutils/utils/pice/module/hardware.c +++ b/modules/rosapps/applications/sysutils/utils/pice/module/hardware.c @@ -283,7 +283,7 @@ BOOLEAN AddToRingBuffer(LPSTR p) } else { - if((UCHAR)p[i]<0x20 && (UCHAR)p[i]>0x7f) + if((UCHAR)p[i]<0x20 || (UCHAR)p[i]>0x7f) p[i]=0x20;
aBuffers[ulInPos][j++] = p[i]; @@ -873,7 +873,7 @@ void Print(USHORT Window,LPSTR p) } else { - if((UCHAR)p[i]<0x20 && (UCHAR)p[i]>0x7f) + if((UCHAR)p[i]<0x20 || (UCHAR)p[i]>0x7f) p[i]=0x20;
if(bOutput)