Skip to content

Commit

Permalink
COMP: Fix compiler error on linux
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information
imikejackson committed Apr 28, 2024
1 parent ad115ee commit 008188d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,20 @@ Result<> ReadStlFile::operator()()
}
// Get the current File Position
fgetpos(f, &pos);
#if defined(__APPLE__) || defined(_WIN32)
if(pos >= stlFileSize)
#else
if(pos.__pos >= stlFileSize)
#endif
{
std::string msg = fmt::format(
"Trying to read at file position {} >= file size {}.\n File Header: '{}'\n Header Triangle Count: {} Current Triangle: {}\n The STL File does not conform to the STL file specification.",
pos, stlFileSize, stlHeaderStr, triCount, t);
#if defined(__APPLE__) || defined(_WIN32)
pos,
#else
pos.__pos,
#endif
stlFileSize, stlHeaderStr, triCount, t);
return MakeErrorResult(nx::core::StlConstants::k_StlFileLengthError, msg);
}

Expand Down

0 comments on commit 008188d

Please sign in to comment.