When using the StringToBytes() function it returns one less byte due to the -1 at the end of the return. The function takes a string and converts it to bytes but it always returns one less byte than what was put in by the string. This causes the number of bytes returned to be in-accurate.

Steps to Reproduce
  1. Open the Visual Studio solution file for 4.17.2
  2. Navigate to lines 1801 - 1812 in UnrealString.h to find StringToBytes


Result: StringToBytes function returns NumBytes - 1

Expected: StringToBytes function returns NumBytes

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-53750 in the post.

Login to Vote

ComponentUE - Foundation - Core
Affects Versions4.
Target Fix4.20
Fix Commit3825777
Main Commit3847482
Release Commit4095966
CreatedJan 4, 2018
ResolvedJan 8, 2018
UpdatedMay 31, 2018
View Jira Issue