Skip to content

Commit

Permalink
Fixed warning on sprintf for Windows font
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfb committed Jul 15, 2011
1 parent 6b6240a commit 0f58230
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/cinder/Font.h
Expand Up @@ -130,7 +130,7 @@ class Font {
class FontInvalidNameExc : public cinder::Exception {
public:
FontInvalidNameExc() throw() {}
FontInvalidNameExc( const std::string &fontName ) throw() { sprintf( mMessage, "%s", fontName.c_str() ); }
FontInvalidNameExc( const std::string &fontName ) throw();
virtual const char* what() const throw() { return mMessage; }
private:
char mMessage[2048];
Expand Down
5 changes: 5 additions & 0 deletions src/cinder/Font.cpp
Expand Up @@ -584,4 +584,9 @@ HDC Font::getGlobalDc()
}
#endif

FontInvalidNameExc::FontInvalidNameExc( const std::string &fontName ) throw()
{
sprintf( mMessage, "%s", fontName.c_str() );
}

} // namespace cinder

0 comments on commit 0f58230

Please sign in to comment.