Geomol / World

World Programming Language
http://world-lang.org
22 stars 7 forks source link

system/options/format/real/digits #16

Closed btiffin closed 12 years ago

btiffin commented 12 years ago
[btiffin@home World]$ ./world
Loading Cortex... Done
World/Cortex 0  Copyright (c) 2009-2011 John Niclasen, NicomSoft
build: Dec 23 2011 10:09:47
w> system/options/format/real/digits: 32
== 32
w> 1 / 3
== 0.33333333333333331482961625624739
w> system/options/format/real/digits: 48
== 48
w> 1 / 3
*** stack smashing detected ***: ./world terminated
======= Backtrace: =========

...

== 0.333333333333333314829616256247390992939472198486Aborted (core dumped)

Somewhere between 32 and 48, my GNU/Linux world cracks. Don't care about digit support that high, but access to the real/digits field may require some fencing.

Geomol commented 12 years ago

Fixed by checking for max 20 digits.

btiffin commented 12 years ago

Tested as fixed.