Skip to content
Permalink
Browse files

Fix subtly broken libgd version check

  • Loading branch information
sfan5 committed Mar 24, 2018
1 parent 6af6be4 commit 0f36b6e37af777c638f9f8c1031890b4e8ab98de
Showing with 1 addition and 1 deletion.
  1. +1 −1 Image.cpp
@@ -103,7 +103,7 @@ void Image::drawCircle(int x, int y, int diameter, const Color &c)

void Image::save(const std::string &filename)
{
#if (GD_MAJOR_VERSION == 2 && GD_MINOR_VERSION >= 1 && GD_RELEASE_VERSION >= 1) || GD_MAJOR_VERSION > 2
#if (GD_MAJOR_VERSION == 2 && GD_MINOR_VERSION == 1 && GD_RELEASE_VERSION >= 1) || (GD_MAJOR_VERSION == 2 && GD_MINOR_VERSION > 1) || GD_MAJOR_VERSION > 2
const char *f = filename.c_str();
if (gdSupportsFileType(f, 1) == GD_FALSE)
throw std::runtime_error("Image format not supported by gd");

0 comments on commit 0f36b6e

Please sign in to comment.