diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 6930251b8f..16af9a48d9 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -6,6 +6,7 @@ should fix in 0.82: - when generating a 32-bit image on a 64-bit system, large numbers which should be bignums become fixnums - httpd fep +- SBUF" " i/o bug - clicks sent twice - speed up ideas: - only do clipping for certain gadgets diff --git a/native/factor.c b/native/factor.c index 6e4f31389b..4ddac15031 100644 --- a/native/factor.c +++ b/native/factor.c @@ -64,6 +64,7 @@ int main(int argc, char** argv) CELL literal_size = 128; CELL args; CELL i; + bool image_given = true; early_init(); @@ -88,7 +89,10 @@ int main(int argc, char** argv) } if(image == NULL) + { + image_given = false; image = default_image_path(); + } init_factor(image, ds_size * 1024, @@ -100,7 +104,7 @@ int main(int argc, char** argv) literal_size * 1024); args = F; - while(--argc > 1) + while(--argc > (image_given ? 1 : 0)) { args = cons(tag_object(from_c_string(argv[argc])),args); } diff --git a/native/macosx/run.m b/native/macosx/run.m index 5545dac8ae..6e4d69ce2e 100644 --- a/native/macosx/run.m +++ b/native/macosx/run.m @@ -42,7 +42,6 @@ void early_init(void) const char *default_image_path(void) { NSBundle *bundle = [NSBundle mainBundle]; - NSString *path = [bundle bundlePath]; - NSString *image = [path stringByAppendingString:@"/Contents/Resources/factor.image"]; + NSString *image = [[bundle resourcePath] stringByAppendingString:@"/factor.image"]; return [image cString]; }