@@ 24,7 24,7 @@ bitart -o or_mod7.png "x y | 7 %"
```

```
-bitart -o stripes.png -s 1024 'x#y#*x100/1+%'
+bitart -o stripes.png -s 1024 'x#y#*y100/1+%'
```

# description
@@ 192,15 192,15 @@ main(int ac, char **av)
/* stack cannot ever be larger than the program length, since there are
* no instructions which grow the stack by more than one */
unsigned int *stack = calloc(strlen(program), sizeof(*stack));
- for (unsigned x = 1; x < width; x++)
- for (unsigned y = 1; y < height; y++) {
+ for (unsigned y = 1; y < height; y++)
+ for (unsigned x = 1; x < width; x++) {
unsigned int *sp = eval(program, x, y, stack);
if (sp - stack < channels) {
fprintf(stderr, "insufficient values left on the stack\n");
exit(1);
}
for (int i = 0; i < channels; i++) {
- data[((x * height) + y) * channels + i] =
+ data[(x + y * width) * channels + i] =
gradient ? stack[i] : ((!!stack[i]) != invert) ? -1 : 0;
}
}