mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 02:29:22 +00:00
protect against negative values that would exceed allowed bit width
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25a081439f
commit
10ca770020
@ -53,7 +53,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setInt(IntType Int) {
|
void setInt(IntType Int) {
|
||||||
assert(Int < (1 << IntBits) && "Integer too large for field");
|
assert(unsigned(Int) < (1 << IntBits) && "Integer too large for field");
|
||||||
Value = reinterpret_cast<intptr_t>(getPointer()) | (intptr_t)Int;
|
Value = reinterpret_cast<intptr_t>(getPointer()) | (intptr_t)Int;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user