flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [1/2] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Update length of BinaryData after writing bytes.
Date Tue, 30 Aug 2016 11:27:17 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 76ae81dbe -> 38591297b


Update length of BinaryData after writing bytes.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9e316fb6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9e316fb6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9e316fb6

Branch: refs/heads/refactor-sprite
Commit: 9e316fb61902fe869342adb20566903f8546b66c
Parents: 04c201f
Author: yishayw <yishayjobs@hotmail.com>
Authored: Tue Aug 30 14:24:33 2016 +0300
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Tue Aug 30 14:24:33 2016 +0300

----------------------------------------------------------------------
 .../Core/src/main/flex/org/apache/flex/utils/BinaryData.as     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9e316fb6/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
index 1b9cfda..2a16e0a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/BinaryData.as
@@ -1059,17 +1059,19 @@ public class BinaryData implements IBinaryDataInput, IBinaryDataOutput
     private function mergeInToArrayBuffer(offset:uint, newBytes:Uint8Array):uint {
         var newContentLength:uint = newBytes.length;
         var dest:Uint8Array;
-        if (offset + newContentLength > _len) {
+		var mergeUpperBound:uint = offset + newContentLength
+        if (mergeUpperBound > _len) {
             dest = new Uint8Array(offset + newContentLength);
             dest.set(new Uint8Array(ba, 0, offset));
             dest.set(newBytes, offset);
             ba = dest.buffer;
             _typedArray = dest;
+			_len = mergeUpperBound;
         } else {
             dest = new Uint8Array(ba, offset, newContentLength);
             dest.set(newBytes);
         }
-        return offset + newContentLength;
+        return mergeUpperBound;
     }
 
     COMPILE::JS


Mime
View raw message