Skip to content

Commit

Permalink
Fix heap corruption bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Sep 7, 2022
1 parent 3bcaec5 commit 055b140
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
if(APPLE)
# TODO: not working (need homebrew llvm's clang)
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fopenmp")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fopenmp")
endif()
endif()
include_directories(${GDAL_INCLUDE_DIR})
Expand Down
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@ void transform(const BoundingBox &extent, int thread){
}
}

BoundingBox extent;

int main(int argc, char **argv) {
cmdLineParse( argc-1 , &argv[1] , params );
if( !InputFile.set || !OutputFile.set ) help(argv[0]);
Expand All @@ -404,7 +406,7 @@ int main(int argc, char **argv) {
arr_height = dataset->GetRasterYSize();

logWriter("Raster Size is %dx%d\n", arr_width, arr_height);
BoundingBox extent = getExtent(dataset);
extent = getExtent(dataset);

logWriter("Extent is (%f, %f), (%f, %f)\n", extent.min.x, extent.max.x, extent.min.y, extent.max.y);

Expand Down

0 comments on commit 055b140

Please sign in to comment.