Changeset 1689 for trunk


Ignore:
Timestamp:
Mar 4, 2011 11:47:00 AM (9 years ago)
Author:
lou
Message:

Account for null at end of string. Fixes ticket #44.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/Clp_C_Interface.cpp

    r1665 r1689  
    442442{
    443443     std::string name = model->model_->problemName();
    444      maxNumberCharacters = CoinMin(maxNumberCharacters, (int)strlen(name.c_str()));
     444     maxNumberCharacters = CoinMin(maxNumberCharacters,
     445                                   ((int) strlen(name.c_str()))+1) ;
    445446     strncpy(array, name.c_str(), maxNumberCharacters - 1);
    446447     array[maxNumberCharacters-1] = '\0';
Note: See TracChangeset for help on using the changeset viewer.