Skip to content

Commit

Permalink
Merge pull request #4565 from james4k/bytes-alloc-cpp
Browse files Browse the repository at this point in the history
[cpp] haxe.io.Bytes.alloc use exact size
  • Loading branch information
hughsando committed Oct 1, 2015
2 parents 36bb144 + a47cf4d commit 29c44b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/haxe/io/Bytes.hx
Expand Up @@ -463,7 +463,7 @@ class Bytes {
return new Bytes(length, BytesData.alloc(length));
#elseif cpp
var a = new BytesData();
if (length>0) a[length-1] = untyped 0;
if (length>0) cpp.NativeArray.setSize(a, length);
return new Bytes(length, a);
#elseif cs
return new Bytes(length, new cs.NativeArray(length));
Expand Down

0 comments on commit 29c44b4

Please sign in to comment.