mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 961271 - Part 1: write BCD chars. r=vicamo
This commit is contained in:
parent
c0bd6944ff
commit
f8a9196aaa
@ -9665,6 +9665,13 @@ let ICCPDUHelper = {
|
||||
writeNumberWithLength: function(number) {
|
||||
if (number) {
|
||||
let numStart = number[0] == "+" ? 1 : 0;
|
||||
number = number.substring(0, numStart) +
|
||||
number.substring(numStart)
|
||||
.replace(/[^0-9*#,]/g, "")
|
||||
.replace(/\*/g, "a")
|
||||
.replace(/\#/g, "b")
|
||||
.replace(/\,/g, "c");
|
||||
|
||||
let numDigits = number.length - numStart;
|
||||
if (numDigits > ADN_MAX_NUMBER_DIGITS) {
|
||||
number = number.substring(0, ADN_MAX_NUMBER_DIGITS + numStart);
|
||||
|
Loading…
Reference in New Issue
Block a user