Update library directories and improve string handling in source files
- Added 'absl::numeric' to the AdditionalLibraryDirectories in yaze.vcxproj for enhanced functionality. - Refactored string handling in multiple source files to use std::strncpy for safer string copying and prevent buffer overflows. - Cleaned up unnecessary whitespace and improved code readability across various files.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "dungeon_object_selector.h"
|
||||
|
||||
#include <iterator>
|
||||
#include <cstring>
|
||||
|
||||
#include "app/core/window.h"
|
||||
#include "app/gfx/arena.h"
|
||||
@@ -1045,7 +1046,8 @@ void DungeonObjectSelector::DrawCompactPropertiesEditor() {
|
||||
static int music_id = 0;
|
||||
|
||||
// Copy current values
|
||||
strncpy(room_name, properties.name.c_str(), sizeof(room_name) - 1);
|
||||
std::strncpy(room_name, properties.name.c_str(), sizeof(room_name) - 1);
|
||||
room_name[sizeof(room_name) - 1] = '\0';
|
||||
dungeon_id = properties.dungeon_id;
|
||||
floor_level = properties.floor_level;
|
||||
is_boss_room = properties.is_boss_room;
|
||||
|
||||
Reference in New Issue
Block a user