From e65f527ad43644a989e5edbf574320191e8933f3 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 18 May 2014 21:31:49 +0200 Subject: [PATCH] WINGs: fix incorrect usage of direction variable in updateStartForCurrentTextBlock (Coverity #50192) As pointed by Coverity, the variable 'dir' is passed by reference because the function may update it; as it is never NULL (the function is local) checking for that does not make sense. From the actual usage, it seems logical that the check should have been on the value, not on the pointer. Signed-off-by: Christophe CURIS --- WINGs/wtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WINGs/wtext.c b/WINGs/wtext.c index 495be70a..c112fbe8 100644 --- a/WINGs/wtext.c +++ b/WINGs/wtext.c @@ -581,7 +581,7 @@ static Bool updateStartForCurrentTextBlock(Text * tPtr, int x, int y, int *dir, return 0; if (tb->graphic) { - tPtr->currentTextBlock = (dir ? tPtr->lastTextBlock : tPtr->firstTextBlock); + tPtr->currentTextBlock = (*dir ? tPtr->lastTextBlock : tPtr->firstTextBlock); tPtr->tpos = 0; return 0; } -- 2.11.4.GIT