Comments (4)
I would point out a possible bug:
SetDescriptionTextForForm(...) in Hooks_Gameplay.cpp
The declaration in the header assigned -1 to the unsigned char, which should underflow and give the max value afaik.
But the implementation compares the unsigned char to "-1" as an integer, not casted to unsigned char and underflowed to max. My IDE tells me the condition is always false.
I made some changes in a fork of the repo that address that by adding the NOMINMAX define before including Windows.h, and then replacing the one single instance of the macros' usage with std::min and std::max.
https://github.com/calebtt/xOBSE/tree/modernized
There are other changes included in the commit, such as changing static const integral variables to static constexpr, a few instances of changing std::container_type<element_type>::iterator to "auto", and other things of that nature--replaced NULL with nullptr. Changed a call to .size() to determine if empty to !.empty(), etc.
from xobse.
Hi @calebtt the current standard is iirc setted as c++latest that should contains c++17 standard with additions from c++20 standard. I don't care what standard is used, until is supported by vs2019 toolchains, and I ask to not bumb to vs2022 as the ide and its tolchains aren't usable under wine.
For conding standard I'm not sure, I'd like to be consistent. I will provide direct feedback in the pull request analysing cade by case.
I will review you changes
from xobse.
Hi @calebtt
Regarding the issue I commented on #220 It seems related on the std::string creation from std::array
While in most place the string is created from the data pointer, in the kDataType_String case it's created from array iterator cbegin cend. This cause the resulting std::string to overallocate (the size is the size of the entire array) and apparently to ignore any Null terminator. This caused the cosave to grow too large and array definitions to be out of bounds.
The solution in this case is to properly create the string usind the internal buffer of the std::Array or using as iterator pair (array.begin(), array.begin() + NullTerminatorIndex). This is important in cases you can't use the char array directly (for example creating wstrings, that I think may be affected by the same issue)
from xobse.
Yes that looks correct, I'm sorry I didn't look into it earlier. Lots of work work.
from xobse.
Related Issues (20)
- Per-Script InvenotryReferences
- GetAlchMenuApparatus doesn't work as documented HOT 2
- 22.9 wont work for some reason HOT 3
- obse error HOT 4
- [xOBSE22.2-xOBSE22.9]Input functions are not functioning properly with obcn_12416.dll, a Chinese localization plugin HOT 22
- Shows completely black window for half a second, then CTD. HOT 1
- A way of detecting which topic, line and response is currently being said in dialogue
- ModTable::Get().GetModIndex giving the wrong index HOT 3
- Suggestion: add syntax to allow adding event handlers directly. HOT 4
- Suggestion: add functions to retrieve creature's Blood spray and Blood decal file paths.
- Remove limitation on using array of arrays for ar_CustomSort.
- xOBSE 22.10beta causes console spam for Lovers with PK script xx0090ea HOT 9
- Suggestion: add new Array type: RefMap.
- Wont work - Application Ioad error 5:0000065434 HOT 5
- Console Spam With Dynamic Mesh Swappers Like Blockhead
- Not compatible with Enhanced Hotkeys & FormID Finder? HOT 2
- RemoveEventHandler and OnKey events
- Minor Wiki Typo
- sv_Replace(StringVar::Replace function in StringVar.cpp) does not take into account when the target is a multibyte character(Problems occurred with Ultimate Leveling in Japanese environment.) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xobse.