mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-23 14:33:07 +00:00
fix(zone): lengths and counts in zone files are checked against what is left of the file
A string length, the path chunk's length and an object's render technique count are compared with the bytes left before memory is set aside for them. The terrain reader is built into dCommon, so every server that reads zone files has it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,8 @@ set(DCOMMON_SOURCES
|
||||
"Permissions.cpp"
|
||||
"PermissionGrants.cpp"
|
||||
"NifFile.cpp"
|
||||
# The terrain reader: every server that reads zone files uses it, not only the worlds
|
||||
"${PROJECT_SOURCE_DIR}/dZoneManager/Raw.cpp"
|
||||
)
|
||||
|
||||
# Workaround for compiler bug where the optimized code could result in a memcpy of 0 bytes, even though that isnt possible.
|
||||
@@ -58,7 +60,7 @@ endforeach()
|
||||
add_library(dCommon STATIC ${DCOMMON_SOURCES})
|
||||
target_include_directories(dCommon
|
||||
PUBLIC "." "dClient" "dEnums"
|
||||
"${PROJECT_SOURCE_DIR}/dZoneManager" # Raw.h (ZoneScenes.h); its reader is dZoneManager's
|
||||
"${PROJECT_SOURCE_DIR}/dZoneManager" # Raw.h and its reader
|
||||
PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase"
|
||||
"${PROJECT_SOURCE_DIR}/dDatabase/GameDatabase/ITables"
|
||||
|
||||
Reference in New Issue
Block a user