project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m
branchios-revival
changeset 11244 57891137ffef
parent 11148 064a53861759
child 12877 00215a7ec5f5
--- a/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m	Sat Oct 24 03:56:02 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapPreviewButtonView.m	Sat Oct 24 15:27:47 2015 +0200
@@ -58,7 +58,7 @@
 #pragma mark -
 #pragma mark preview
 -(int) sendToEngine:(NSString *)string {
-    unsigned char length = [string length];
+    unsigned char length = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
 
     SDLNet_TCP_Send(csd, &length, 1);
     return SDLNet_TCP_Send(csd, [string UTF8String], length);