diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-14 06:25:33 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-14 06:25:33 +0300 |
commit | 541ba689913e8359216a61a67a60425837af88a9 (patch) | |
tree | d74b3170e86db69571593a2265c8d4503fd392a3 /source/blender/editors/space_text | |
parent | a5571fd0e8cddeb19fd7191896bc57ded44bdd7d (diff) |
Cleanup: use size_t for BLF text API functions
Also minor cleanup to txt_sel_to_buf:
- Use memcpy instead of strncpy as the strings don't contain nil bytes.
- Replace while loops with for loops.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_undo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_text/text_undo.c b/source/blender/editors/space_text/text_undo.c index 864193bfad8..035a9f29dc3 100644 --- a/source/blender/editors/space_text/text_undo.c +++ b/source/blender/editors/space_text/text_undo.c @@ -59,7 +59,7 @@ typedef struct TextState { static void text_state_encode(TextState *state, Text *text, BArrayStore *buffer_store) { - int buf_len = 0; + size_t buf_len = 0; uchar *buf = (uchar *)txt_to_buf_for_undo(text, &buf_len); state->buf_array_state = BLI_array_store_state_add(buffer_store, buf, buf_len, NULL); MEM_freeN(buf); |