patch 9.1.0904: Vim9: copy-paste error in class_defining_member()
Commit:
https://github.com/vim/vim/commit/215c82d061d750d8a26ef52f529a9e3ca4e0f82a
Author: Zdenek Dohnal <[email protected]>
Date: Wed Dec 4 20:19:40 2024 +0100
patch 9.1.0904: Vim9: copy-paste error in class_defining_member()
Problem: Vim9: copy-paste error in class_defining_member()
Solution: use variable type VAR_CLASS instead (Zdenek Dohnal)
Found issue by OpenScanHub:
Error: COPY_PASTE_ERROR (CWE-398):
vim91/src/vim9class.c:3308: original: "VAR_OBJECT" looks like the
original copy.
vim91/src/vim9class.c:3316: copy_paste_error: "VAR_OBJECT" looks like a
copy-paste error.
vim91/src/vim9class.c:3316: remediation: Should it say "VAR_CLASS"
instead?
3314| {
3315| cl_tmp = super;
3316|-> vartype = VAR_OBJECT;
3317| }
3318| }
closes: #16163
Signed-off-by: Zdenek Dohnal <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/version.c b/src/version.c
index 95d4cc1a1..42d8e1182 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 904,
/**/
903,
/**/
diff --git a/src/vim9class.c b/src/vim9class.c
index d0ddcb820..e85cf827f 100644
--- a/src/vim9class.c
+++ b/src/vim9class.c
@@ -3313,7 +3313,7 @@ class_defining_member(class_T *cl, char_u *name, size_t
len, ocmember_T **p_m)
if (( m = class_member_lookup(super, name, len, NULL)) != NULL)
{
cl_tmp = super;
- vartype = VAR_OBJECT;
+ vartype = VAR_CLASS;
}
}
if (cl_tmp == NULL)
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1tIv4X-008VQl-Aq%40256bit.org.