You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2018/06/25 08:19:50 UTC
[royale-asjs] branch develop updated: The unsigned right shift
operator keeps the value as a uint
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new bdd5e07 The unsigned right shift operator keeps the value as a uint
bdd5e07 is described below
commit bdd5e07aae1e5e9f22cee9f38c19f04a281572f7
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Jun 25 11:19:43 2018 +0300
The unsigned right shift operator keeps the value as a uint
---
.../Core/src/main/royale/org/apache/royale/utils/BinaryData.as | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
index 4deb23e..acfec5b 100644
--- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
+++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/BinaryData.as
@@ -666,9 +666,9 @@ public class BinaryData implements IBinaryDataInput, IBinaryDataOutput
{
var arr:Uint8Array = getTypedArray();
if(endian == Endian.BIG_ENDIAN){
- return (arr[_position++] * 16777216) + (arr[_position++] << 16) + ( arr[_position++] << 8) + arr[_position++];
+ return ((arr[_position++] << 24) >>> 0) + (arr[_position++] << 16) + ( arr[_position++] << 8) + arr[_position++];
} else {
- return arr[_position++] + ( arr[_position++] << 8) + (arr[_position++] << 16) + (arr[_position++] * 16777216)
+ return arr[_position++] + ( arr[_position++] << 8) + (arr[_position++] << 16) + ((arr[_position++] << 24) >>> 0);
}
}
}