From c577b058a18a4b78aca1f132e5a509a71fab29a5 Mon Sep 17 00:00:00 2001 From: Nicholas Baron Date: Tue, 16 Apr 2019 23:29:04 -0700 Subject: [PATCH] Added a early return in ProgrammerOperandLength --- src/CalcViewModel/Common/CopyPasteManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CalcViewModel/Common/CopyPasteManager.cpp b/src/CalcViewModel/Common/CopyPasteManager.cpp index 39bdca0f..bcce4107 100644 --- a/src/CalcViewModel/Common/CopyPasteManager.cpp +++ b/src/CalcViewModel/Common/CopyPasteManager.cpp @@ -453,7 +453,7 @@ bool CopyPasteManager::TryOperandToULL(const wstring& operand, int numberBase, u size_t CopyPasteManager::OperandLength(wstring operand, ViewMode mode, CategoryGroupType modeType, int programmerNumberBase) { - if(modeType == CategoryGroupType::Converter) { + if (modeType == CategoryGroupType::Converter) { return operand.length(); } @@ -516,7 +516,7 @@ size_t CopyPasteManager::ProgrammerOperandLength(const wstring& operand, int num break; default: // No defined prefixes/suffixes - break; + return 0; } // UInt suffixes are common across all modes