From: ueno Date: Sat, 20 Nov 2004 00:21:07 +0000 (+0000) Subject: * ntlm.el (ntlm-ascii2unicode): Don't apply zerop to a character. X-Git-Tag: flim-1_14_8~9 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cc492c20479075c905b60bb50bbbd18b51e573a;p=elisp%2Fflim.git * ntlm.el (ntlm-ascii2unicode): Don't apply zerop to a character. (ntlm-smb-hash): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 7d7254a..661109a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-20 Daiki Ueno + + * ntlm.el (ntlm-ascii2unicode): Don't apply zerop to a character. + (ntlm-smb-hash): Ditto. + 2004-10-01 MORIOKA Tomohiko * FLIM: Version 1.14.7 (Sanj-Dò) released.-A diff --git a/ntlm.el b/ntlm.el index 84522c5..c576307 100644 --- a/ntlm.el +++ b/ntlm.el @@ -224,7 +224,7 @@ by PASSWORD-HASHES. PASSWORD-HASHES should be a return value of little-endian utf16." (let ((utf (make-string (* 2 len) 0)) (i 0) val) (while (and (< i len) - (not (zerop (setq val (aref str i))))) + (not (eq (setq val (aref str i)) ?\0))) (aset utf (* 2 i) val) (aset utf (1+ (* 2 i)) 0) (setq i (1+ i))) @@ -289,7 +289,7 @@ a string KEY of length 8. FORW is t or nil." (setq outb (ntlm-smb-dohash inb keyb forw)) (setq i 0) (while (< i 64) - (unless (zerop (aref outb i)) + (unless (eq (aref outb i) ?\0) (setq aa (aref out (/ i 8))) (aset out (/ i 8) (logior aa (lsh 1 (- 7 (% i 8))))))