]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-encode-string): Make sure mask value is
authorRichard M. Stallman <rms@gnu.org>
Thu, 31 Dec 1998 13:44:02 +0000 (13:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 31 Dec 1998 13:44:02 +0000 (13:44 +0000)
positive; (emacs-pid) returns a negative number on Windows 9x
which causes odd behaviour.

lisp/mail/rmail.el

index eb0e39205ac0c2d01a334b8a65ca70e4bb20033e..25380f17c59033c12ab6e0d9c53f453418d6edc9 100644 (file)
@@ -3332,6 +3332,7 @@ second-lowest-byte with the second character of the string, etc.,
 restarting at the lowest byte of the mask whenever it runs out.
 Returns the encoded string.  Calling the function again with an
 encoded string (and the same mask) will decode the string."
+ (setq mask (abs mask))                        ; doesn't work if negative
  (let* ((string-vector (string-to-vector string)) (i 0) 
        (len (length string-vector)) (curmask mask) charmask)
    (while (< i len)