mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-23 09:41:04 +00:00
Fix compilation problem on Linux (fix #604)
This commit is contained in:
parent
15b0b86339
commit
f3309ec52b
@ -1,5 +1,5 @@
|
|||||||
// Aseprite Base Library
|
// Aseprite Base Library
|
||||||
// Copyright (c) 2001-2013 David Capello
|
// Copyright (c) 2001-2013, 2015 David Capello
|
||||||
//
|
//
|
||||||
// This file is released under the terms of the MIT license.
|
// This file is released under the terms of the MIT license.
|
||||||
// Read LICENSE.txt for more information.
|
// Read LICENSE.txt for more information.
|
||||||
@ -11,6 +11,7 @@
|
|||||||
#include "base/exception.h"
|
#include "base/exception.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
@ -24,7 +25,7 @@ Exception::Exception() throw()
|
|||||||
Exception::Exception(const char* format, ...) throw()
|
Exception::Exception(const char* format, ...) throw()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!strchr(format, '%')) {
|
if (!std::strchr(format, '%')) {
|
||||||
m_msg = format;
|
m_msg = format;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -32,7 +33,7 @@ Exception::Exception(const char* format, ...) throw()
|
|||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
|
|
||||||
char buf[1024]; // TODO warning buffer overflow
|
char buf[1024]; // TODO warning buffer overflow
|
||||||
vsprintf(buf, format, ap);
|
std::vsprintf(buf, format, ap);
|
||||||
m_msg = buf;
|
m_msg = buf;
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user