Navigation Menu

Skip to content

Commit

Permalink
fix a few argument checking odd syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Dec 13, 2012
1 parent 1a6a400 commit 5506642
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mapnik_fonts.hpp
Expand Up @@ -28,7 +28,7 @@ static inline Handle<Value> register_fonts(const Arguments& args)


try try
{ {
if (!args.Length() >= 1 || !args[0]->IsString()) if (args.Length() == 0 || !args[0]->IsString())
return ThrowException(Exception::TypeError( return ThrowException(Exception::TypeError(
String::New("first argument must be a path to a directory of fonts"))); String::New("first argument must be a path to a directory of fonts")));


Expand Down
2 changes: 1 addition & 1 deletion src/mapnik_image.cpp
Expand Up @@ -571,7 +571,7 @@ Handle<Value> Image::save(const Arguments& args)
{ {
HandleScope scope; HandleScope scope;


if (!args.Length() >= 1 || !args[0]->IsString()){ if (args.Length() == 0 || !args[0]->IsString()){
return ThrowException(Exception::TypeError( return ThrowException(Exception::TypeError(
String::New("filename required"))); String::New("filename required")));
} }
Expand Down
2 changes: 1 addition & 1 deletion src/mapnik_image_view.cpp
Expand Up @@ -466,7 +466,7 @@ Handle<Value> ImageView::save(const Arguments& args)
{ {
HandleScope scope; HandleScope scope;


if (!args.Length() >= 1 || !args[0]->IsString()){ if (args.Length() == 0 || !args[0]->IsString()){
return ThrowException(Exception::TypeError( return ThrowException(Exception::TypeError(
String::New("filename required"))); String::New("filename required")));
} }
Expand Down

0 comments on commit 5506642

Please sign in to comment.