Репозитории ALT
Группа :: Звук
Пакет: aumix
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: aumix-2.9.1-alt-rh-crackrock.patch
Скачать
Скачать
diff -Naur aumix-2.9.1-orig//src/common.c aumix-2.9.1/src/common.c
--- aumix-2.9.1-orig//src/common.c 2010-05-06 03:36:47.000000000 +0000
+++ aumix-2.9.1/src/common.c 2010-10-09 08:37:12.899448713 +0000
@@ -20,6 +20,7 @@
* Suite 330, Boston, MA 02111-1307, USA.
*/
+#include <errno.h>
#include "common.h"
#ifdef HAVE_CURSES
#include "curses.h"
@@ -628,18 +629,15 @@
{
/* Change or display settings from the command line. */
char *devstr;
- char dest[4];
int change = 0, tmp, left, right;
/* Increase or decrease levels, optionally by a number. */
if (!strncmp(optarg, "+", 1) || !strncmp(optarg, "-", 1)) {
ErrorExitWarn(ReadLevel(dev, &tmp), 'e');
right = tmp >> 8; /* I'll take the high byte, */
left = tmp & 0xFF; /* and you take the low byte. */
- memset(dest, 0, sizeof(dest));
- strncpy(dest, (optarg + 1), 3);
- change = 1; /* For compatibility with versions 1.15 to 1.17, assume one if no number was given. */
- if (atoi(dest))
- change = atoi(dest);
+ change = (int) strtol(optarg, NULL, 10);
+ if (errno)
+ change = 1; /* For compatibility with versions 1.15 to 1.17, assume one if no number was given. */
if (*optarg == '+') { /* increase */
right += change;
left += change;