зеркало из https://github.com/mozilla/gecko-dev.git
Bug 545927. Check for negative numbers before doing roman-numeral stuff. r=sicking
This commit is contained in:
Родитель
22e26321c0
Коммит
2660fe554c
|
@ -0,0 +1,28 @@
|
|||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function main()
|
||||
{
|
||||
xml=document.implementation.createDocument('', '', null);
|
||||
xml.appendChild(doc=xml.createElement('root'));
|
||||
|
||||
var p = new DOMParser();
|
||||
text = '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">';
|
||||
text += '<xsl:template match="/">';
|
||||
text += '<body>';
|
||||
text += '<xsl:number value="2147483648" format="i"/>';
|
||||
text += '</body>';
|
||||
text += '</xsl:template>';
|
||||
text += '</xsl:stylesheet>';
|
||||
xsl=p.parseFromString(text, 'text/xml');
|
||||
|
||||
xsltProcessor=new XSLTProcessor();
|
||||
xsltProcessor.importStylesheet(xsl);
|
||||
d = xsltProcessor.transformToFragment(xml, document);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="main()">
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -9,3 +9,4 @@ load 485286.xml
|
|||
load 528300.xml
|
||||
load 528488.xml
|
||||
load 528963.xml
|
||||
load 545927.html
|
||||
|
|
|
@ -220,8 +220,8 @@ const char* const kTxRomanNumbers[] =
|
|||
|
||||
void txRomanCounter::appendNumber(PRInt32 aNumber, nsAString& aDest)
|
||||
{
|
||||
// Numbers bigger then 3999 can't be done in roman
|
||||
if (aNumber >= 4000) {
|
||||
// Numbers bigger then 3999 and negative numbers can't be done in roman
|
||||
if (PRUint32(aNumber) >= 4000) {
|
||||
txDecimalCounter().appendNumber(aNumber, aDest);
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче