From 872816f0564cd05420c84626a1e2a2f3aa98f7c8 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Tue, 24 May 2022 01:09:39 -0700 Subject: [PATCH] VGM Decoder: Change logic of dictionary creation Metadata logic code should be using this dictionaryWithDictionary method so that the resulting dictionary is actually immutable, like it claims to be, rather than simply casting it. Safety coding, all that jazz. Not really a major issue, just feels right. Signed-off-by: Christopher Snowhill --- Plugins/vgmstream/vgmstream/VGMDecoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/vgmstream/vgmstream/VGMDecoder.m b/Plugins/vgmstream/vgmstream/VGMDecoder.m index bcd979e59..52af7c7b6 100644 --- a/Plugins/vgmstream/vgmstream/VGMDecoder.m +++ b/Plugins/vgmstream/vgmstream/VGMDecoder.m @@ -187,7 +187,7 @@ static NSString *get_description_tag(const char *description, const char *tag, c if(![year isEqualToNumber:[NSNumber numberWithInt:0]]) [mutableMetadata setValue:year forKey:@"year"]; - NSDictionary *metadata = mutableMetadata; + NSDictionary *metadata = [NSDictionary dictionaryWithDictionary:mutableMetadata]; NSDictionary *package = @{@"properties": properties, @"metadata": metadata};