diff options
-rw-r--r-- | audio/sidplay2/Makefile | 2 | ||||
-rw-r--r-- | audio/sidplay2/files/patch-src_args.cpp | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/audio/sidplay2/Makefile b/audio/sidplay2/Makefile index 67fc0ad22601..a3151aefd60e 100644 --- a/audio/sidplay2/Makefile +++ b/audio/sidplay2/Makefile @@ -3,7 +3,7 @@ PORTNAME= sidplay2 PORTVERSION= 2.0.9 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= audio emulators MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/sidplay-${PORTVERSION} DISTNAME= sidplay-${PORTVERSION} diff --git a/audio/sidplay2/files/patch-src_args.cpp b/audio/sidplay2/files/patch-src_args.cpp new file mode 100644 index 000000000000..99213f69711a --- /dev/null +++ b/audio/sidplay2/files/patch-src_args.cpp @@ -0,0 +1,22 @@ +--- src/args.cpp.orig 2004-05-05 23:49:20 UTC ++++ src/args.cpp +@@ -95,7 +95,7 @@ using std::endl; + // Convert time from integer + bool ConsolePlayer::parseTime (const char *str, uint_least32_t &time) + { +- char *sep; ++ const char *sep; + uint_least32_t _time; + + // Check for empty string +@@ -110,8 +110,9 @@ bool ConsolePlayer::parseTime (const cha + else + { // Read in MM:SS format + int val; +- *sep = '\0'; ++ char *tmp = strndup(str, sep - str); + val = atoi (str); ++ free(tmp); + if (val < 0 || val > 99) + return false; + _time = (uint_least32_t) val * 60; |