Maxim Sokhatsky 11 years ago
parent
commit
a5d785ed04
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/web/priv/static/app/js/n2o/bert.js

+ 1 - 1
apps/web/priv/static/app/js/n2o/bert.js

@@ -49,7 +49,7 @@ function ltoi(S, Length) {
     isNegative = (S.charCodeAt(0) > 128);
     isNegative = (S.charCodeAt(0) > 128);
     for (i = 0; i < Length; i++) {
     for (i = 0; i < Length; i++) {
         n = S.charCodeAt(i);
         n = S.charCodeAt(i);
-        if (isNegative) { n = n - 255; }
+        if (isNegative) { n = 255 - n ; }
         if (Num === 0) { Num = n; }
         if (Num === 0) { Num = n; }
         else { Num = Num * 256 + n; }
         else { Num = Num * 256 + n; }
     }
     }