Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(849)

Unified Diff: content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm

Issue 15039018: Gamepad: Don't emit BOM in Gamepad ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
index 84bad06f7707fc730bcb13f1d79fb0478e03da46..b9356f2454a87fac23d73f9c09d032a811c7077e 100644
--- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
+++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm
@@ -217,7 +217,7 @@ void GamepadPlatformDataFetcherMac::DeviceAdd(IOHIDDeviceRef device) {
associated_[slot].mapper ? "STANDARD GAMEPAD " : "",
vendor_int,
product_int];
- NSData* as16 = [ident dataUsingEncoding:NSUTF16StringEncoding];
+ NSData* as16 = [ident dataUsingEncoding:NSUTF16LittleEndianStringEncoding];
const size_t kOutputLengthBytes = sizeof(data_.items[slot].id);
memset(&data_.items[slot].id, 0, kOutputLengthBytes);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698