From dea8967483b00f67d311c44c6d184098c2904fa5 Mon Sep 17 00:00:00 2001 From: Michael Adams Date: Sat, 19 Feb 2022 08:05:00 -0800 Subject: [PATCH] Applied the following patch from OpenSUSE: xv-3.10a-dirw.dif --- src/xvdir.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xvdir.c b/src/xvdir.c index 28e1fb3..c947b69 100644 --- a/src/xvdir.c +++ b/src/xvdir.c @@ -556,6 +556,10 @@ int x,y; if (XTextWidth(mfinfo, &filename[stPos], 1+pos-stPos) > tx) break; } + + if (pos == 0) + return -1; + /* if we are more than halfway past this char, put the insertion point after it */ dx = tx - XTextWidth(mfinfo, &filename[stPos], pos-stPos); if (dx > XTextWidth(mfinfo, &filename[pos], 1)/2) -- 2.35.1