question

Can Baycay avatar image
Can Baycay asked

Fixed a string lower case conversion bug

Hi

Cought a bug in PlayFab_SharedSettingsProxy constructor where the string is converted to lowercase. To convert the string in an internationalization friendly way, a remarkably skilled awesomely handsome top-notch ninja programmer has to decide whether ToLowerInvariant is the best fit for the task. :)

A good explanation: https://stackoverflow.com/questions/6225808/string-tolower-and-string-tolowerinvariant

In our case, ToLower in PlayFab_SharedSettingsProxy constructor failed to detect "TitleId" because ToLower converts that to "titleıd" while expecting it to be "titleid" for sure. Changing the lowercase conversion to ToLowerInvariant fixed the problem.

Also there are other places in code where ToLower is used. You may want to have a look at them.

Cheers,

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image 1807605288 ♦ commented ·

Hello, I need more information before I can figure out what this issue is.
Which PlayFab SDK are you using? Which version? Which file are you referencing, and what line? All our code is open source, so you can also provide a link directly to the problematic source in GitHub:
https://github.com/PlayFab

For example:

https://github.com/PlayFab/UnitySDK/blob/master/Source/PlayFabSDK/Shared/Public/PlayFabSettings.cs#L164

As you can see in the line above, our UnitySDK does not lowercase the titleId.

0 Likes 0 ·
Can Baycay avatar image Can Baycay 1807605288 ♦ commented ·

I forgot to mention that trying to write quickly. Sorry.

It's in the latest version (2.24.170710) of PlayFab Unity Editor Extensions. Exact location is here:

https://github.com/PlayFab/UnityEditorExtensions/blob/master/Source/Assets/PlayFabEditorExtensions/Editor/Scripts/Utils/PlayFabEditorDataService.cs#L82

0 Likes 0 ·

1 Answer

·
1807605288 avatar image
1807605288 answered

Wow, I learn something new every day I guess...

Ok, that'll be resolved in the next patch. Thanks for reporting this.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.