Be more tolerant of invalid arguments
FossilOrigin-Name: d2f07d884a4f4319ff687e085c3233e210ee05b46a2675ecd757a261e6f19e6e
This commit is contained in:
parent
f1968ce5af
commit
38747afbb5
12 changed files with 112 additions and 88 deletions
|
@ -88,6 +88,8 @@ music(OFString *name)
|
|||
stopsound();
|
||||
if (soundvol && musicvol) {
|
||||
@autoreleasepool {
|
||||
name = [name stringByReplacingOccurrencesOfString:@"\\"
|
||||
withString:@"/"];
|
||||
OFString *path =
|
||||
[OFString stringWithFormat:@"packages/%@", name];
|
||||
OFIRI *IRI = [Cube.sharedInstance.gameDataIRI
|
||||
|
@ -148,7 +150,8 @@ registersound(OFString *name)
|
|||
if (snames == nil)
|
||||
snames = [[OFMutableArray alloc] init];
|
||||
|
||||
[snames addObject:name];
|
||||
[snames addObject:[name stringByReplacingOccurrencesOfString:@"\\"
|
||||
withString:@"/"]];
|
||||
samples.add(NULL);
|
||||
|
||||
return samples.length() - 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue