Skip to content

Commit

Permalink
fix errors caught by printf formatting check
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Jan 12, 2025
1 parent 71bfb2f commit daa7b8a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ContentBuildingReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ bool includeFile(SpriteNode* node, TiXmlElement* includeNode, SpriteTile* &oldSi
TiXmlElement* elemParent;
if(!loadOkay) {
contentError("Include failed",includeNode);
LogError("File load failed: %s\n",configfilepath);
LogError("File load failed: %s\n", configfilepath.string().c_str());
LogError("Line %d: %s\n",doc.ErrorRow(),doc.ErrorDesc());
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion ContentLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ bool ContentLoader::parseContentIndexFile( std::filesystem::path filepath )
LogError( "Unable to load config index file at: %s!\n", filepath.string().c_str() );
return false;
}
LogVerbose("Reading index at %s...\n", filepath);
LogVerbose("Reading index at %s...\n", filepath.string().c_str());

while ( !myfile.eof() ) {

Expand Down
4 changes: 2 additions & 2 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ int loadImgFile(std::filesystem::path filename)
if(!tempfile) {
return -1;
}
LogVerbose("New image: %s\n",filename);
LogVerbose("New image: %s\n", filename.string().c_str());
if(currentCache < 0) {
// FIXME: this is some really weird logic.
IMGCache.push_back(al_create_bitmap(ssConfig.imageCacheSize, ssConfig.imageCacheSize));
Expand Down Expand Up @@ -1450,7 +1450,7 @@ int loadImgFile(std::filesystem::path filename)
}
IMGFilelist.push_back(temp);
IMGFilenames.push_back(std::make_unique<std::filesystem::path>(filename));
LogVerbose("New image: %s\n",filename);
LogVerbose("New image: %s\n", filename.string().c_str());
return (int)IMGFilelist.size() - 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ALLEGRO_BITMAP* load_bitmap_withWarning(std::filesystem::path path)
ALLEGRO_BITMAP* img = 0;
img = al_load_bitmap(path.string().c_str());
if(!img) {
LogError("Cannot load image: %s\n", path);
LogError("Cannot load image: %s\n", path.string().c_str());
al_set_thread_should_stop(stonesense_event_thread);
return 0;
}
Expand Down

0 comments on commit daa7b8a

Please sign in to comment.