Maiori44 / Xilef

Small bot with commands, minigames and an economy system
8 stars 10 forks source link

fixing the 0/0 = infinity theory #51

Closed Volas171 closed 3 years ago

Volas171 commented 3 years ago

idk someone on yeet hosting keeps saying 0/0 = infinity due to this image soooo I created a "fix" for it (needs review) its clearly not a good fix as it can be bypassed but its something to stop this image

Volas171 commented 3 years ago

This is an interesting hack but..you do know &eval is gonna be replaced by a safe &debug, right?

understood, but it can be used with the debug anyways as it is just checking if there's 0/(number) or number/0 in message content and returns the output skipping actual eval executing.

TL;DR you just need to change the "eval" from it and copy the code (lol)

Maiori44 commented 3 years ago

This is an interesting hack but..you do know &eval is gonna be replaced by a safe &debug, right?

understood, but it can be used with the debug anyways as it is just checking if there's 0/(number) or number/0 in message content and returns the output skipping actual eval executing.

TL;DR you just need to change the "eval" from it and copy the code (lol)

guess we can merge it then

LJMSU commented 3 years ago

0/0 != Infinity logically or mathematically. while n > 0 && n/0 == Infinity logically, but not mathematically.