mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-17 21:24:20 +00:00
Fix String Length for UTF8 Encoding
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="28" android:versionName="1.1.1" package="com.jwetzell.qlabcontroller" android:installLocation="auto">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="29" android:versionName="1.1.2" package="com.jwetzell.qlabcontroller" android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
|
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@
|
|||||||
<key>XSAppIconAssets</key>
|
<key>XSAppIconAssets</key>
|
||||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2.1.0</string>
|
<string>2.1.2</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.0</string>
|
<string>1.0</string>
|
||||||
<key>ITSAppUsesNonExemptEncryption</key>
|
<key>ITSAppUsesNonExemptEncryption</key>
|
||||||
|
|||||||
@@ -37,13 +37,14 @@
|
|||||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<CodesignKey>iPhone Developer</CodesignKey>
|
<CodesignKey>iPhone Developer: Joel Wetzell (5E8CU66YWB)</CodesignKey>
|
||||||
<MtouchFloat32>true</MtouchFloat32>
|
<MtouchFloat32>true</MtouchFloat32>
|
||||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||||
<MtouchLink>SdkOnly</MtouchLink>
|
<MtouchLink>SdkOnly</MtouchLink>
|
||||||
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
<MtouchArch>ARMv7, ARM64</MtouchArch>
|
||||||
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<CodesignProvision>qController Dev</CodesignProvision>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
|
|||||||
Executable → Regular
+3
-4
@@ -391,12 +391,11 @@ namespace SharpOSC
|
|||||||
|
|
||||||
protected static byte[] setString(string value)
|
protected static byte[] setString(string value)
|
||||||
{
|
{
|
||||||
int len = value.Length + (4 - value.Length % 4);
|
var bytes = Encoding.UTF8.GetBytes(value);
|
||||||
if (len <= value.Length) len = len + 4;
|
int len = bytes.Length + (4 - bytes.Length % 4);
|
||||||
|
if (len <= bytes.Length) len = len + 4;
|
||||||
|
|
||||||
byte[] msg = new byte[len];
|
byte[] msg = new byte[len];
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetBytes(value);
|
|
||||||
bytes.CopyTo(msg, 0);
|
bytes.CopyTo(msg, 0);
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
|
|||||||
Reference in New Issue
Block a user