mirror of https://github.com/WerWolv/ImHex
msvc having trouble with positive and negative numbers.
This commit is contained in:
parent
66077ba74e
commit
a0deb66da5
|
|
@ -322,7 +322,7 @@ namespace hex::ui {
|
|||
}
|
||||
|
||||
char Line::operator[](u64 index) const {
|
||||
i64 signedIndex = std::clamp((i64) index, (i64) -m_chars.size(), (i64) (m_chars.size() - 1));
|
||||
i64 signedIndex = std::clamp((i64) index,0 - (i64) m_chars.size(), (i64) (m_chars.size() - 1));
|
||||
if (signedIndex < 0)
|
||||
return m_chars[m_chars.size() + signedIndex];
|
||||
return m_chars[signedIndex];
|
||||
|
|
|
|||
Loading…
Reference in New Issue