octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38973] Tiny Bug in base64decode:


From: anonymous
Subject: [Octave-bug-tracker] [bug #38973] Tiny Bug in base64decode:
Date: Mon, 13 May 2013 04:28:56 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3

URL:
  <http://savannah.gnu.org/bugs/?38973>

                 Summary: Tiny Bug in base64decode: 
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 13 May 2013 04:28:54 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: DAVE GOEL
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.4
        Operating System: GNU/Linux

    _______________________________________________________

Details:

octave:194> base64encode([99 99 0 0])
error: base64encode is expecting integers in the range 0 .. 255
error: called from:error:  
/usr/share/octave/packages/3.2/strings-1.0.7/base64encode.m at line 32, column
5

As you can see, the input was actually in the supplied range. 

The problem is a simple displaced paren here in the first conditional of line
32

  elseif (any(X(:)) != fix(X(:)) || any(X(:) < 0) || any(X(:) > 255))

This should be replaced by:


  elseif (any(X(:) != fix(X(:))) || any(X(:) < 0) || any(X(:) > 255))


Thanks.
Dave.
-- 





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38973>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]