math.parser: only allow 10 and 16 base for float>base.

db4
John Benediktsson 2012-06-06 14:50:07 -07:00
parent 45e2b697be
commit 9dbeef4933
1 changed files with 2 additions and 1 deletions

View File

@ -408,7 +408,8 @@ M: ratio >base
: float>base ( n base -- str )
{
{ 16 [ float>hex ] }
[ drop "%.16g" format-float ]
{ 10 [ "%.16g" format-float ] }
[ "Invalid base" throw ]
} case ; inline
PRIVATE>