Commit 0c6ef792 authored by Timothée Giet's avatar Timothée Giet
Browse files

roman_numerals, avoid entering or converting to more than 3999

parent a4455ec9
......@@ -247,7 +247,7 @@ ActivityBase {
// conversion code copied from:
// http://blog.stevenlevithan.com/archives/javascript-roman-numeral-converter
function arabic2Roman(num) {
if (!+num)
if (!+num || num > 3999)
return '';
var digits = String(+num).split(""),
key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment