Skip to content

Commit

Permalink
Fix CxxView::getIntegerAtCursor for hex
Browse files Browse the repository at this point in the history
  • Loading branch information
yegord committed Apr 22, 2019
1 parent 85b4d34 commit e6546a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nc/gui/CxxView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ boost::optional<ConstantValue> CxxView::getIntegerUnderCursor() const {
cursor.movePosition(QTextCursor::StartOfWord);
cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);

if (auto value = stringToInt<ConstantValue>(cursor.selectedText())) {
if (auto value = stringToInt<ConstantValue>(cursor.selectedText(), 0)) {
return *value;
}
return boost::none;
Expand Down

0 comments on commit e6546a0

Please sign in to comment.