File: secure-format-log-string-1.84.diff

package info (click to toggle)
oolite 1.84-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 124,644 kB
  • ctags: 3,975
  • sloc: objc: 132,132; ansic: 3,138; sh: 559; perl: 359; makefile: 276; php: 5
file content (196 lines) | stat: -rw-r--r-- 7,713 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
Description: part of secure-format-log-string.diff new with 1.84
 These new changes are stored in a different patch for readability.
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/src/Core/Universe.m
+++ b/src/Core/Universe.m
@@ -255,7 +255,7 @@
 		[NSException raise:NSInternalInconsistencyException format:@"%s: expected only one Universe to exist at a time.", __PRETTY_FUNCTION__];
 	}
 	
-	OO_DEBUG_PROGRESS(@"Universe initWithGameView:");
+	OO_DEBUG_PROGRESS("%@", @"Universe initWithGameView:");
 	
 	self = [super init];
 	if (self == nil)  return nil;
@@ -941,7 +941,7 @@
 	
 	sunGoneNova = [systeminfo oo_boolForKey:@"sun_gone_nova" defaultValue:NO];
 	
-	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - clearSubRegions, sky, dust");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - clearSubRegions, sky, dust");
 	[universeRegion clearSubregions];
 	
 	// fixed entities (part of the graphics system really) come first...
@@ -1024,7 +1024,7 @@
 	
 	// actual entities next...
 	
-	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - planet");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - planet");
 	a_planet=[self setUpPlanet]; // resets RNG when called
 	double planet_radius = [a_planet radius];
 	OO_DEBUG_POP_PROGRESS();
@@ -1032,7 +1032,7 @@
 	// set the system seed for random number generation
 	seed_for_planet_description(systemSeed);
 	
-	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - sun");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - sun");
 	/*- space sun -*/
 	double		sun_radius;
 	double		sun_distance;
@@ -1139,7 +1139,7 @@
 	[self setLighting];
 	OO_DEBUG_POP_PROGRESS();
 	
-	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - main station");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - main station");
 	/*- space station -*/
 	stationPos = [a_planet position];
 
@@ -1226,7 +1226,7 @@
 	OO_DEBUG_POP_PROGRESS();
 	
 	
-	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - populate from wormholes");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - populate from wormholes");
 	[self populateSpaceFromActiveWormholes];
 	OO_DEBUG_POP_PROGRESS();
 
@@ -1243,7 +1243,7 @@
 	// check for nova
 	if (sunGoneNova)
 	{
-	 	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - post-nova");
+	 	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - post-nova");
 		
 	 	HPVector v0 = make_HPvector(0,0,34567.89);
 	 	double min_safe_dist2 = 6000000.0 * 6000000.0;
@@ -1263,7 +1263,7 @@
 	 	cachedStation = nil;	
 	}
 
-	OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - populate from hyperpoint");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - populate from hyperpoint");
 //	[self populateSpaceFromHyperPoint:witchPos toPlanetPosition: a_planet->position andSunPosition: a_sun->position];
 	[self clearSystemPopulator];
 
@@ -1288,7 +1288,7 @@
 		OOStandardsDeprecated([NSString stringWithFormat:@"The script_actions system info key is deprecated for %@.",[self getSystemName:systemID]]);
 		if (!OOEnforceStandards()) 
 		{
-			OO_DEBUG_PUSH_PROGRESS(@"setUpSpace - legacy script_actions");
+			OO_DEBUG_PUSH_PROGRESS(@"%@", @"setUpSpace - legacy script_actions");
 			[PLAYER runUnsanitizedScriptActions:script_actions
 							  allowingAIMethods:NO
 								withContextName:@"<system script_actions>"
@@ -7447,7 +7447,7 @@
 	NSString *key = nil;
 	if (_descriptions == nil)
 	{
-		OOLog(@"descriptions.verify",@"***** FATAL: Tried to verify descriptions, but descriptions was nil - unable to load any descriptions.plist file.");
+		OOLog(@"descriptions.verify", @"%@", @"***** FATAL: Tried to verify descriptions, but descriptions was nil - unable to load any descriptions.plist file.");
 		exit(EXIT_FAILURE);
 	}
 	foreachkey (key, _descriptions)
@@ -7819,7 +7819,7 @@
 
 - (OOSystemID) findSystemAtCoords:(NSPoint) coords withGalaxy:(OOGalaxyID) g
 {
-	OOLog(@"deprecated.function",@"findSystemAtCoords");
+	OOLog(@"deprecated.function", @"%@", @"findSystemAtCoords");
 	return [self findSystemNumberAtCoords:coords withGalaxy:g includingHidden:YES];
 }
 
@@ -9889,19 +9889,19 @@
 {
 	PlayerEntity* player = PLAYER;
 	
-	OO_DEBUG_PUSH_PROGRESS(@"Wormhole and character reset");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"Wormhole and character reset");
 	if (activeWormholes) [activeWormholes autorelease];
 	activeWormholes = [[NSMutableArray arrayWithCapacity:16] retain];
 	if (characterPool) [characterPool autorelease];
 	characterPool = [[NSMutableArray arrayWithCapacity:256] retain];
 	OO_DEBUG_POP_PROGRESS();
 	
-	OO_DEBUG_PUSH_PROGRESS(@"Galaxy reset");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"Galaxy reset");
 	[self setGalaxyTo: [player galaxyNumber] andReinit:YES];
 	systemID = [player systemID];
 	OO_DEBUG_POP_PROGRESS();
 	
-	OO_DEBUG_PUSH_PROGRESS(@"Player init: setUpShipFromDictionary");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"Player init: setUpShipFromDictionary");
 	[player setUpShipFromDictionary:[[OOShipRegistry sharedRegistry] shipInfoForKey:[player shipDataKey]]];	// the standard cobra at this point
 	[player baseMass]; // bootstrap the base mass used in all fuel charge calculations.
 	OO_DEBUG_POP_PROGRESS();
--- a/src/Core/Debug/OODebugSupport.m
+++ b/src/Core/Debug/OODebugSupport.m
@@ -117,7 +117,7 @@
 
 static id LoadDebugPlugIn()
 {
-	OO_DEBUG_PUSH_PROGRESS(@"Loading debug plug-in");
+	OO_DEBUG_PUSH_PROGRESS(@"%@", @"Loading debug plug-in");
 	
 	id debugController = nil;
 	
--- a/src/Core/OOConvertSystemDescriptions.m
+++ b/src/Core/OOConvertSystemDescriptions.m
@@ -57,7 +57,7 @@
 												   andMerge:NO];
 	if (sysDescDict == nil)
 	{
-		OOLog(@"sysdesc.compile.failed.fileNotFound", @"Could not load a dictionary from sysdesc.plist, ignoring --compile-sysdesc option.");
+		OOLog(@"sysdesc.compile.failed.fileNotFound", @"%@", @"Could not load a dictionary from sysdesc.plist, ignoring --compile-sysdesc option.");
 		return;
 	}
 	
@@ -69,7 +69,7 @@
 	sysDescArray = OOConvertSystemDescriptionsToArrayFormat(sysDescDict, keyMap);
 	if (sysDescArray == nil)
 	{
-		OOLog(@"sysdesc.compile.failed.conversion", @"Could not convert sysdesc.plist to descriptions.plist format for some reason.");
+		OOLog(@"sysdesc.compile.failed.conversion", @"%@", @"Could not convert sysdesc.plist to descriptions.plist format for some reason.");
 		return;
 	}
 	
@@ -94,11 +94,11 @@
 	
 	if ([ResourceManager writeDiagnosticData:data toFileNamed:@"sysdesc-compiled.plist"])
 	{
-		OOLog(@"sysdesc.compile.success", @"Wrote translated sysdesc.plist to sysdesc-compiled.plist.");
+		OOLog(@"sysdesc.compile.success", @"%@", @"Wrote translated sysdesc.plist to sysdesc-compiled.plist.");
 	}
 	else
 	{
-		OOLog(@"sysdesc.compile.failed.writeFailure", @"Could not write translated sysdesc.plist to sysdesc-compiled.plist.");
+		OOLog(@"sysdesc.compile.failed.writeFailure", @"%@", @"Could not write translated sysdesc.plist to sysdesc-compiled.plist.");
 	}
 }
 
@@ -121,7 +121,7 @@
 	sysDescDict = OOConvertSystemDescriptionsToDictionaryFormat(sysDescArray, keyMap);
 	if (sysDescArray == nil)
 	{
-		OOLog(@"sysdesc.export.failed.conversion", @"Could not convert system_description do sysdesc.plist format for some reason.");
+		OOLog(@"sysdesc.export.failed.conversion", @"%@", @"Could not convert system_description do sysdesc.plist format for some reason.");
 		return;
 	}
 	
@@ -144,11 +144,11 @@
 	
 	if ([ResourceManager writeDiagnosticData:data toFileNamed:@"sysdesc.plist"])
 	{
-		OOLog(@"sysdesc.export.success", @"Wrote translated system_description to sysdesc.plist.");
+		OOLog(@"sysdesc.export.success", @"%@", @"Wrote translated system_description to sysdesc.plist.");
 	}
 	else
 	{
-		OOLog(@"sysdesc.export.failed.writeFailure", @"Could not write translated system_description to sysdesc.plist.");
+		OOLog(@"sysdesc.export.failed.writeFailure", @"%@", @"Could not write translated system_description to sysdesc.plist.");
 	}
 }