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

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

[Octave-bug-tracker] [bug #54373] strncmp does not compute result accura


From: Rik
Subject: [Octave-bug-tracker] [bug #54373] strncmp does not compute result accurately when N exceeds string length
Date: Wed, 25 Jul 2018 13:10:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #4, bug #54373 (project octave):

@Arnaud: Could you run the following code in Matlab and report back the
result?


strncmp ("abc",  {"abcd", "bca", "abc"}, 4)


It's either [0 0 0] or [0 0 1].  I suspect the second.


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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