Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37533723
en ru br
Репозитории ALT
S:2.2.1-alt1
5.1: 1.9.7-alt2
4.1: 1.9.5-alt1
4.0: 1.9.5-alt1
3.0: 1.9.5-alt1
www.altlinux.org/Changes

Группа :: Игры/Аркады
Пакет: icebreaker

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: icebreaker-1.9.7-alt-buffer.patch
Скачать


diff -Naur icebreaker-1.9.7-orig/menu.c icebreaker-1.9.7/menu.c
--- icebreaker-1.9.7-orig/menu.c	2002-06-01 16:46:46 +0000
+++ icebreaker-1.9.7/menu.c	2009-07-20 11:23:04 +0000
@@ -522,7 +522,7 @@
 		{ // "random", at the end/beginning of the list
 			
 			strncpy(val,"random",MAXMENUVALUELENGTH);
-			snprintf(options.theme,MAXMENUVALUELENGTH,"random");
+			snprintf(options.theme,MAXTHEMENAMELENGTH,"random");
 			
 			settheme("linux"); // just for pretty
 			
@@ -538,13 +538,13 @@
 			if (mbutton==1 || mbutton==4) // left click or scroll forwards
 			{
 				strncpy(val,themelist[(t+1)%themecount],MAXMENUVALUELENGTH);
-				snprintf(options.theme,MAXMENUVALUELENGTH,themelist[(t+1)%themecount]);
+				snprintf(options.theme,MAXTHEMENAMELENGTH,themelist[(t+1)%themecount]);
 			}
 			else // right or middle or scroll back
 			{
 				if (t<0) t=themecount;
 				strncpy(val,themelist[(t-1)%themecount],MAXMENUVALUELENGTH);
-				snprintf(options.theme,MAXMENUVALUELENGTH,themelist[(t-1)%themecount]);
+				snprintf(options.theme,MAXTHEMENAMELENGTH,themelist[(t-1)%themecount]);
 			}
 			
 			settheme(options.theme);
diff -Naur icebreaker-1.9.7-orig/themes.c icebreaker-1.9.7/themes.c
--- icebreaker-1.9.7-orig/themes.c	2002-05-31 03:49:53 +0000
+++ icebreaker-1.9.7/themes.c	2009-07-20 11:24:17 +0000
@@ -474,7 +474,7 @@
 
 int setrandomtheme()
 {
-	char themename[MAXTHEMENAMELENGTH];
+	char themename[MAXTHEMENAMELENGTH+1];
 	char** themelist;
 	int themecount;
 	
@@ -483,11 +483,11 @@
 	{
 		fprintf(stderr,"Hey! You can't have a theme named random! Please remove the random.ibt\n"
 		        "file from your themes directory.\n");
-		snprintf(themename,MAXTHEMENAMELENGTH+1,"linux");
+		snprintf(themename,MAXTHEMENAMELENGTH,"linux");
 	}
 	else
 	{
-		snprintf(themename,MAXTHEMENAMELENGTH+1,themelist[random() %themecount]);
+		snprintf(themename,MAXTHEMENAMELENGTH,themelist[random() %themecount]);
 	}
 	freethemenames(&themelist,themecount);
 	return settheme(themename);
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin