diff options
| author | Roy Frostig <[email protected]> | 2010-08-12 16:21:08 -0700 |
|---|---|---|
| committer | Roy Frostig <[email protected]> | 2010-08-12 16:21:08 -0700 |
| commit | 4e376852e709844d67f94430d9dc954d5be722b4 (patch) | |
| tree | fb23b6a4ffc16914b89ab161ad4ace54c1a2b7ff /src/boot/util | |
| parent | Address FIXME in _vec waiting on closed issue #108. (diff) | |
| download | rust-4e376852e709844d67f94430d9dc954d5be722b4.tar.xz rust-4e376852e709844d67f94430d9dc954d5be722b4.zip | |
Fix max_sz bug that ended up causing us to index incorrectly into a vec of tag types. Add a testcase.
Diffstat (limited to 'src/boot/util')
| -rw-r--r-- | src/boot/util/common.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/boot/util/common.ml b/src/boot/util/common.ml index 58caf78d..7b0f7848 100644 --- a/src/boot/util/common.ml +++ b/src/boot/util/common.ml @@ -686,7 +686,7 @@ let rec max_sz (a:size) (b:size) : size = | (SIZE_rt_max (b, c), a) when a = c -> max_sz a b | (SIZE_fixed a, SIZE_fixed b) -> SIZE_fixed (i64_max a b) | (SIZE_fixed 0L, b) when no_negs b -> b - | (a, SIZE_fixed 0L) when no_negs a -> b + | (a, SIZE_fixed 0L) when no_negs a -> a | (a, SIZE_fixed b) -> max_sz (SIZE_fixed b) a | (a, b) when a = b -> a | (a, b) -> SIZE_rt_max (a, b) |