You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just read RFC 4506 and its description is as follows in 4.10, 4.11 and 4.13, so I think we should set the maximum value to (2**32) - 1.
4.13. Variable-Length Array
Counted arrays provide the ability to encode variable-length arrays
of homogeneous elements. The array is encoded as the element count n
(an unsigned integer) followed by the encoding of each of the array's
elements, starting with element 0 and progressing through element
n-1. The declaration for variable-length arrays follows this form:
type-name identifier<m>;
or
type-name identifier<>;
The constant m specifies the maximum acceptable element count of an
array; if m is not specified, as in the second declaration, it is
assumed to be (2**32) - 1.
What did you expect to see?
Set the maximum value to (2**32) - 1.
What did you see instead?
The maximum value is set to (2**31) - 1.
Can you help confirm if this is a bug? Or am I missing something?
The text was updated successfully, but these errors were encountered:
It looks like a bug but I think it's worth checking if arrays with a length larger than (2**31) - 1 actually work in JS. I suspect it may be due to JS limitations.
What version are you using?
the lastest code from master branch.
What did you do?
Please look at the following two lines of code, we set the maximum value to
2 ** 31 - 1
https://github.com/stellar/xdrgen/blob/master/lib/xdrgen/generators/javascript.rb#L5
https://github.com/stellar/xdrgen/blob/master/lib/xdrgen/generators/javascript.rb#L238
I just read RFC 4506 and its description is as follows in 4.10, 4.11 and 4.13, so I think we should set the maximum value to
(2**32) - 1
.What did you expect to see?
Set the maximum value to
(2**32) - 1
.What did you see instead?
The maximum value is set to
(2**31) - 1
.Can you help confirm if this is a bug? Or am I missing something?
The text was updated successfully, but these errors were encountered: