Changeset 2616


Ignore:
Timestamp:
Jun 30, 2019 5:09:11 PM (3 months ago)
Author:
stefan
Message:

fix argument processing in ampl interface

  • use strlen to get size of string
  • provided by @jamesjer
  • closes #235
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/Cbc_ampl.cpp

    r2467 r2616  
    598598      for (j = 0; j < sizeof(something) / sizeof(char *); j++) {
    599599        const char *check = something[j];
    600         if (!strncmp(argument, check, sizeof(check))) {
     600        if (!strncmp(argument, check, strlen(check))) {
    601601          found = (int)(j + 1);
    602602        } else if (!strncmp(argument, "log", 3)) {
Note: See TracChangeset for help on using the changeset viewer.