~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update the OS X makefile so I can build on Lion. Regrettably that
[sgt/puzzles]
/
unfinished
/
numgame.c
diff --git
a/unfinished/numgame.c
b/unfinished/numgame.c
index
8f59c73
..
20861ca
100644
(file)
--- a/
unfinished/numgame.c
+++ b/
unfinished/numgame.c
@@
-542,9
+542,9
@@
static int perform_sqrt(int *a, int *b, int *output)
int half[2] = { 1, 2 };
/*
int half[2] = { 1, 2 };
/*
- * sqrt(1) == 1: don't perform unary noops.
+ * sqrt(
0) == 0, sqrt(
1) == 1: don't perform unary noops.
*/
*/
- if (a[0] ==
1 && a[1] == 1
) return FALSE;
+ if (a[0] ==
0 || (a[0] == 1 && a[1] == 1)
) return FALSE;
return perform_exp(a, half, output);
}
return perform_exp(a, half, output);
}