1
0
Эх сурвалжийг харах

libobs: Fix compiling in ISO C17 mode

derrod 2 жил өмнө
parent
commit
b3cf98f230
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      libobs/obs-cocoa.m

+ 3 - 2
libobs/obs-cocoa.m

@@ -487,6 +487,9 @@ static bool code_to_str(int code, struct dstr *str)
 
 void obs_key_to_str(obs_key_t key, struct dstr *str)
 {
+	const UniCharCount max_length = 16;
+	UniChar buffer[max_length];
+
 	if (localized_key_to_str(key, str))
 		return;
 
@@ -519,9 +522,7 @@ void obs_key_to_str(obs_key_t key, struct dstr *str)
 		goto err;
 	}
 
-	const UniCharCount max_length = 16;
 	UInt32 dead_key_state = 0;
-	UniChar buffer[max_length];
 	UniCharCount len = 0;
 
 	OSStatus err =