diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-19 06:46:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-19 06:46:37 +0300 |
commit | 2a15040777a04170a00c3591065b8243e40428d5 (patch) | |
tree | 88703ecd5d4d2684f265dc1c16e2a26e8497774a | |
parent | 97f9015ed0b1a6a3e6247d5958dd50bbcd21d5ca (diff) | |
parent | 529f0427fce2245d60eb885518f055209405b016 (diff) |
Merge branch 'blender-v3.3-release'
-rw-r--r-- | source/blender/editors/interface/interface_ops.cc | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/IMB_imbuf_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_path.cc | 8 |
4 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_ops.cc b/source/blender/editors/interface/interface_ops.cc index 311d670b4ca..0657e17f1dc 100644 --- a/source/blender/editors/interface/interface_ops.cc +++ b/source/blender/editors/interface/interface_ops.cc @@ -830,8 +830,8 @@ static int override_idtemplate_create_exec(bContext *C, wmOperator *UNUSED(op)) * liboverride (note that in theory this remapping has already been done by code above), but * only in case owner ID was already an existing liboverride. * - * Otherwise, owner ID will also have been overridden, and remapped already to use itsoverride - * of the data too. */ + * Otherwise, owner ID will also have been overridden, and remapped already to use it's + * override of the data too. */ RNA_id_pointer_create(id_override, &idptr); RNA_property_pointer_set(&owner_ptr, prop, idptr, NULL); RNA_property_update(C, &owner_ptr, prop); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index cd5a65270df..77837b96e86 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -887,8 +887,8 @@ static void template_id_liboverride_hierarchy_create(bContext *C, * created liboverride (note that in theory this remapping has already been done by code * above), but only in case owner ID was already an existing liboverride. * - * Otherwise, owner ID will also have been overridden, and remapped already to use itsoverride - * of the data too. */ + * Otherwise, owner ID will also have been overridden, and remapped already to use + * it's override of the data too. */ if (ID_IS_OVERRIDE_LIBRARY_REAL(owner_id)) { RNA_id_pointer_create(id_override, idptr); } diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index 5ad226a26f2..45d05e9b856 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -251,7 +251,7 @@ typedef struct ImBuf { int refcounter; /* some parameters to pass along for packing images */ - /** Compressed image only used with PNG and EXR currently */ + /** Compressed image only used with PNG and EXR currently. */ unsigned char *encodedbuffer; /** Size of data written to `encodedbuffer`. */ unsigned int encodedsize; diff --git a/source/blender/makesrna/intern/rna_path.cc b/source/blender/makesrna/intern/rna_path.cc index f14e2113e13..99cb456027f 100644 --- a/source/blender/makesrna/intern/rna_path.cc +++ b/source/blender/makesrna/intern/rna_path.cc @@ -704,12 +704,16 @@ const char *RNA_path_array_index_token_find(const char *rna_path, const Property /* Valid 'array part' of a rna path can only have '[', ']' and digit characters. * It may have more than one of those (e.g. `[12][1]`) in case of multi-dimensional arrays. */ - int64_t rna_path_len = (int64_t)strlen(rna_path); + if (UNLIKELY(rna_path[0] == '\0')) { + return NULL; + } + size_t rna_path_len = (size_t)strlen(rna_path) - 1; if (rna_path[rna_path_len] != ']') { return NULL; } + const char *last_valid_index_token_start = NULL; - for (rna_path_len--; rna_path_len >= 0; rna_path_len--) { + while (rna_path_len--) { switch (rna_path[rna_path_len]) { case '[': if (rna_path_len <= 0 || rna_path[rna_path_len - 1] != ']') { |