Campbell Barton 2483c19ad3 BKE_idprop: string size argument consistency, fix off by one errors
The length passed to IDP_NewString included the nil terminator
unlike IDP_AssignString. Callers to IDP_AssignString from MOD_nodes.cc
passed in an invalid size for e.g. There where also callers passing in
the strlen(..) of the value unnecessarily.

Resolve with the following changes:

- Add `*MaxSize()` versions of IDP_AssignString & IDP_NewString which
  take a size argument.

- Remove the size argument from the existing functions as most callers
  don't need to clamp the length of the string, avoid calculating &
  passing in length values when they're unnecessary.

- When clamping the size is needed, both functions now include the nil
  byte in the size since this is the convention for BLI_string and other
  BLI API's dealing with nil terminated strings,
  it avoids having to pass in `sizeof(value) - 1`.
2023-05-02 15:15:40 +10:00
2023-05-02 08:41:10 +10:00
2023-04-28 12:23:29 +10:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%