summaryrefslogtreecommitdiff
path: root/silly-malloc/teehee.c
diff options
context:
space:
mode:
authorrose <rose@pinkro.se>2025-08-13 01:28:16 +0200
committerrose <rose@pinkro.se>2025-08-13 01:28:16 +0200
commitb7be2c5498fd1844daadd9e78aa031c60be9cb44 (patch)
tree7ca176b6892b5ff23c5439025eaf552400007b8f /silly-malloc/teehee.c
parente9b64be5230f0b498d8d78a8e67158a843594f83 (diff)
downloadrandom-b7be2c5498fd1844daadd9e78aa031c60be9cb44.tar.gz
random-b7be2c5498fd1844daadd9e78aa031c60be9cb44.tar.bz2
Change chances for silly-mallocHEADmain
Diffstat (limited to 'silly-malloc/teehee.c')
-rw-r--r--silly-malloc/teehee.c4
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);