royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [royale-asjs] branch develop updated: Shifting 24 bits converted to negative int value
Date Sun, 24 Jun 2018 19:25:45 GMT
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 ce95546  Shifting 24 bits converted to negative int value
ce95546 is described below

commit ce95546395ade51c63ba9b8a9cff7c63477b8c4a
Author: Harbs <harbs@in-tools.com>
AuthorDate: Sun Jun 24 22:25:37 2018 +0300

    Shifting 24 bits converted to negative int value
---
 .../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 c430369..fad4ea3 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
@@ -665,9 +665,9 @@ public class BinaryData implements IBinaryDataInput, IBinaryDataOutput
         {
             var arr:Uint8Array = getTypedArray();
             if(endian == Endian.BIG_ENDIAN){
-                return (arr[_position++] << 24) + (arr[_position++] << 16) +
( arr[_position++] << 8) + arr[_position++];
+                return (arr[_position++] * 16777216) + (arr[_position++] << 16) + (
arr[_position++] << 8) + arr[_position++];
             } else {
-                return arr[_position++] + ( arr[_position++] << 8) + (arr[_position++]
<< 16) + (arr[_position++] << 24)
+                return arr[_position++] + ( arr[_position++] << 8) + (arr[_position++]
<< 16) + (arr[_position++] * 16777216)
             }
         }
     }


Mime
View raw message