Skip to content

Commit

Permalink
Explicitely add array sizes.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy committed Apr 3, 2020
1 parent 4d8fdba commit b3c868d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnuplot_i.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,9 +1820,9 @@ bool Gnuplot::file_available(const std::string &filename)
std::string Gnuplot::create_tmpfile(std::ofstream &tmp)
{
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__)
char name[] = {'g', 'n', 'u', 'p', 'l', 'o', 't', 'i', 'X', 'X', 'X', 'X', 'X', 'X', '\0'}; //tmp file in working directory
char name[15] = {'g', 'n', 'u', 'p', 'l', 'o', 't', 'i', 'X', 'X', 'X', 'X', 'X', 'X', '\0'}; //tmp file in working directory
#elif defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__)
char name[] = {'/', 't', 'm', 'p', '/', 'g', 'n', 'u', 'p', 'l', 'o', 't', 'i', 'X', 'X', 'X', 'X', 'X', 'X', '\0'}; // tmp file in /tmp
char name[20] = {'/', 't', 'm', 'p', '/', 'g', 'n', 'u', 'p', 'l', 'o', 't', 'i', 'X', 'X', 'X', 'X', 'X', 'X', '\0'}; // tmp file in /tmp
#endif

//
Expand Down

0 comments on commit b3c868d

Please sign in to comment.