Closed
Bug 436367
Opened 16 years ago
Closed 16 years ago
TT: File.fileToByteArray does not set the length of the returning ByteArray
Categories
(Tamarin Graveyard :: Tracing Virtual Machine, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: dschaffe, Assigned: tierney)
Details
Attachments
(2 files)
371 bytes,
patch
|
treilly
:
review+
|
Details | Diff | Splinter Review |
656 bytes,
patch
|
brbaker
:
review+
|
Details | Diff | Splinter Review |
File.fileToByteArray should set length to ByteArray as the number of bytes read. Many ByteArray function fail since they check if the pointer is past the length this simple code e.g. shows the problem: test.txt: 12345 bug.as: import avmplus.* var ba:ByteArray=File.fileToByteArray("test.txt",false); print("bytearray.length should be 5 is 0"); print("bytearray.length="+ba.length); // workaround manually set length //ba.length=5; print("ba[0-5]="+ba[0]+" "+ba[1]+" "+ba[2]+" "+ba[3]+" "+ba[4]); actual: undefined undefined undefined undefined expected: 49 50 51 52 53
Assignee | ||
Comment 1•16 years ago
|
||
Attachment #323736 -
Flags: review?(treilly)
Updated•16 years ago
|
Attachment #323736 -
Flags: review?(treilly) → review+
Assignee | ||
Comment 2•16 years ago
|
||
Pushed in changeset http://hg.mozilla.org/tamarin-tracing/index.cgi/rev/b5a18ce0a6d3
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 3•15 years ago
|
||
Attachment #404868 -
Flags: review?(brbaker)
Updated•15 years ago
|
Attachment #404868 -
Attachment is patch: true
Attachment #404868 -
Attachment mime type: application/octet-stream → text/plain
Updated•15 years ago
|
Attachment #404868 -
Flags: review?(brbaker) → review+
Reporter | ||
Comment 4•15 years ago
|
||
pushed new tests in changeset 2732:0a9e319cd180, closing as verified fixed.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•