Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix a few argument checking odd syntax

  • Loading branch information...
commit 5506642b505b4a12bb025ca9dd94f8acd4c0fa8b 1 parent 1a6a400
@springmeyer springmeyer authored
View
2  src/mapnik_fonts.hpp
@@ -28,7 +28,7 @@ static inline Handle<Value> register_fonts(const Arguments& args)
try
{
- if (!args.Length() >= 1 || !args[0]->IsString())
+ if (args.Length() == 0 || !args[0]->IsString())
return ThrowException(Exception::TypeError(
String::New("first argument must be a path to a directory of fonts")));
View
2  src/mapnik_image.cpp
@@ -571,7 +571,7 @@ Handle<Value> Image::save(const Arguments& args)
{
HandleScope scope;
- if (!args.Length() >= 1 || !args[0]->IsString()){
+ if (args.Length() == 0 || !args[0]->IsString()){
return ThrowException(Exception::TypeError(
String::New("filename required")));
}
View
2  src/mapnik_image_view.cpp
@@ -466,7 +466,7 @@ Handle<Value> ImageView::save(const Arguments& args)
{
HandleScope scope;
- if (!args.Length() >= 1 || !args[0]->IsString()){
+ if (args.Length() == 0 || !args[0]->IsString()){
return ThrowException(Exception::TypeError(
String::New("filename required")));
}
Please sign in to comment.
Something went wrong with that request. Please try again.