diff options
author | rose <rose@pinkro.se> | 2025-08-13 01:28:16 +0200 |
---|---|---|
committer | rose <rose@pinkro.se> | 2025-08-13 01:28:16 +0200 |
commit | b7be2c5498fd1844daadd9e78aa031c60be9cb44 (patch) | |
tree | 7ca176b6892b5ff23c5439025eaf552400007b8f /silly-malloc/teehee.c | |
parent | e9b64be5230f0b498d8d78a8e67158a843594f83 (diff) | |
download | random-main.tar.gz random-main.tar.bz2 |
Diffstat (limited to 'silly-malloc/teehee.c')
-rw-r--r-- | silly-malloc/teehee.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/silly-malloc/teehee.c b/silly-malloc/teehee.c index 635a413..ed92eb9 100644 --- a/silly-malloc/teehee.c +++ b/silly-malloc/teehee.c @@ -12,9 +12,9 @@ extern void *malloc (size_t size) { if (!real_malloc) return NULL; // lmao srand (time (NULL)); - int val = rand () % 3; + int val = (rand () % 2)+1; if (val > 1) { - long loss = rand () % (int) size; + long loss = (rand () % (int) size)+5; return real_malloc (size - loss); } else { return real_malloc (size); |