diff options
Diffstat (limited to 'generator/pgmnoise.c')
-rw-r--r-- | generator/pgmnoise.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/pgmnoise.c b/generator/pgmnoise.c index 643f260f..af65a23b 100644 --- a/generator/pgmnoise.c +++ b/generator/pgmnoise.c @@ -55,7 +55,7 @@ int main(int argc, for (row = 0; row < rows; ++row) { unsigned int col; for (col = 0; col < cols; ++col) - destrow[col] = rand() % PGM_MAXMAXVAL; + destrow[col] = rand() % (PGM_MAXMAXVAL + 1); pgm_writepgmrow(stdout, destrow, cols, PGM_MAXMAXVAL, 0); } |