Skip to content

Commit

Permalink
BUG: Fix CPR reading EDX data bug
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Nov 8, 2024
1 parent c61a730 commit d14bf1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# set project's name
project(EbsdLibProj VERSION 1.0.34)
project(EbsdLibProj VERSION 1.0.35)

# ---------- Setup output Directories -------------------------
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
Expand Down
6 changes: 4 additions & 2 deletions Source/EbsdLib/IO/HKL/CprReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,11 @@ std::vector<CrcDataParser> CprReader::createFieldParsers(const std::string& file
auto elementName = getFieldValue<std::string>(ini, "EDX Windows", fieldNameStrm.str());
if(elementName.empty())
{
elementName = "Unknown Field";
fieldNameStrm.str(""); // Clear the stringstream buffer
fieldNameStrm << "Field" << i;
elementName = fieldNameStrm.str();
}
fieldOrder[i].FieldDefinition = {4, elementName, EbsdLib::NumericTypes::Type::Int32};
fieldOrder[i].FieldDefinition = {4, elementName, EbsdLib::NumericTypes::Type::Float};
fieldOrder[i].destinationPtr = nullptr;
fieldOrder[i].readOffset = currentOffset;
currentOffset += 4;
Expand Down

0 comments on commit d14bf1a

Please sign in to comment.