[Zucchini] Fix undefined shift in GetSleb128.
A left shift resulting in truncation is undefined behavior on signed int types in C++. It is fine to left shift an unsigned type because there is no issues with two's complement representation or sign bits. To get around this we need to perform the shift on the uint type and recast it to a signed int type. Bug: 860067 Change-Id: Ibace5aceb17c4435d6d37d5e37a16fa781c7dd99 Reviewed-on: https://chromium-review.googlesource.com/1126169Reviewed-by:Samuel Huang <huangs@chromium.org> Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org> Cr-Commit-Position: refs/heads/master@{#572577}
Showing
Please register or sign in to comment