summaryrefslogtreecommitdiff
path: root/audio/xwave/patches
diff options
context:
space:
mode:
authoritohy <itohy>2001-11-18 05:37:43 +0000
committeritohy <itohy>2001-11-18 05:37:43 +0000
commit6fffab8d3bc9858c714e5e6d8d2633b14b0f8bf8 (patch)
tree38d81fbfc205f4027bd7ed0637146c6b69b1e79a /audio/xwave/patches
parent94fb56ef548f2f6571a21ef6a896a498010e302e (diff)
downloadpkgsrc-6fffab8d3bc9858c714e5e6d8d2633b14b0f8bf8.tar.gz
Avoid selecting outside of the waveform,
which causes hang on copy or cut operation.
Diffstat (limited to 'audio/xwave/patches')
-rw-r--r--audio/xwave/patches/patch-ah15
1 files changed, 12 insertions, 3 deletions
diff --git a/audio/xwave/patches/patch-ah b/audio/xwave/patches/patch-ah
index a545cdff08e..6ae55cd8351 100644
--- a/audio/xwave/patches/patch-ah
+++ b/audio/xwave/patches/patch-ah
@@ -1,7 +1,7 @@
-$NetBSD: patch-ah,v 1.3 2001/11/17 15:17:42 itohy Exp $
+$NetBSD: patch-ah,v 1.4 2001/11/18 05:37:44 itohy Exp $
--- src/graphics.c.orig Thu Aug 13 08:27:09 1998
-+++ src/graphics.c Sun Nov 18 00:06:53 2001
++++ src/graphics.c Sun Nov 18 13:32:53 2001
@@ -30,7 +30,7 @@
#ifdef linux
@@ -11,7 +11,16 @@ $NetBSD: patch-ah,v 1.3 2001/11/17 15:17:42 itohy Exp $
#include <machine/endian.h>
#elif defined (sgi)
#include <sys/endian.h>
-@@ -2064,6 +2064,9 @@
+@@ -1758,6 +1758,8 @@
+ md->wd->markbeg=ceil(event->x*md->mg->step);
+ md->wd->marklength=ceil((firstmark-event->x)*md->mg->step);
+ }
++ if (md->wd->markbeg + md->wd->marklength > md->wd->tlength)
++ md->wd->marklength = md->wd->tlength - md->wd->markbeg;
+ md->wd->ismark=True;
+ md->wd->isplay=False;
+ md->cg->pos=(md->wd->markbeg+md->wd->marklength)*md->wd->bpspl;
+@@ -2064,6 +2066,9 @@
if (XPending(dpy)) {
XPeekEvent(dpy,&pev);
switch (pev.type) {