diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e626bb4a0..709d81554 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -51,6 +51,7 @@ foreach (COMPONENT IN LISTS COMPONENTS) if (DEFINED STP_BUILD_COMPONENT_EXECUTABLE) add_executable(${COMPONENT} ${COMPONENT}/${COMPONENT}.cpp ${COMPONENT}/${COMPONENT}Report.cpp) + target_include_directories(${COMPONENT} PRIVATE ${STP_BASE_DIRECTORY}/include/) target_link_libraries(${COMPONENT} calc) endif () diff --git a/src/multiply/multiply.cpp b/src/multiply/multiply.cpp index bb8c98bfa..72bda632a 100644 --- a/src/multiply/multiply.cpp +++ b/src/multiply/multiply.cpp @@ -86,8 +86,9 @@ namespace steppable::__internals::arithmetic for (size_t indexB = 0; indexB < bStr.length(); indexB++) { const int bDigit = static_cast(bStr[indexB]) - '0'; - if (bDigit == 0) - continue; + // Skip if the digit is 0. This seems to cause issues (#5), so it's commented out for now. + // if (bDigit == 0) + // continue; std::vector currentProdDigits(aStr.length() + bStr.length() + 1, 0), currentCarries(aStr.length() + bStr.length() + 1, 0); for (long long indexA = static_cast(aStr.length()) - 1; indexA != -1; indexA--)