changeset 30536:9e47c6f6b548 stable

Use octave_strncasecmp wrapper instead of strncasecmp. * libinterp/corefcn/oct-stream.cc (textscan::lookahead): Use octave_strncasecmp wrapper instead of calling POSIX function strncasecmp directly.
author Gene Harvey <gharveymn@gmail.com>
date Mon, 27 Sep 2021 10:38:27 -0500
parents a8e988190128
children 9e56eb717561
files libinterp/corefcn/oct-stream.cc
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc	Fri Sep 24 16:40:13 2021 -0500
+++ b/libinterp/corefcn/oct-stream.cc	Mon Sep 27 10:38:27 2021 -0500
@@ -42,6 +42,7 @@
 #include "Array.h"
 #include "Cell.h"
 #include "byte-swap.h"
+#include "lo-cutils.h"
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 #include "lo-utils.h"
@@ -3896,7 +3897,7 @@
 
     int i;
     int (*compare)(const char *, const char *, std::size_t);
-    compare = (case_sensitive ? strncmp : strncasecmp);
+    compare = (case_sensitive ? strncmp : octave_strncasecmp);
 
     for (i = 0; i < targets.numel (); i++)
       {