Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix subtly broken libgd version check
  • Loading branch information
sfan5 committed Mar 24, 2018
1 parent 6af6be4 commit 0f36b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Image.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit 0f36b6e

Please sign in to comment.