1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-19 09:34:47 +02:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Sébastien Helleu 93f5371cf8 Version 3.0.1 2021-01-31 10:07:53 +01:00
Sébastien Helleu 9db6255a84 Revert "exec: return NULL immediately if the task id is invalid"
This reverts commit dff1bf6f0f.

(cherry picked from commit 08ebc99dea)
2020-12-06 13:42:30 +01:00
Sébastien Helleu 03d36f13af spell: fix refresh of bar item "spell_suggest" when the input becomes empty (issue #1586)
When the input is empty, length of string is zero: when sending zero to
function weechat_string_dyn_alloc, the function returns NULL and therefore we
return immediately instead of handling the empty input, which is a valid value.

The regression was introduced by the use of dynamic strings, commit:
299f74bfef

(cherry picked from commit eb90a73fe8)
2020-11-20 22:21:59 +01:00
Sébastien Helleu b1fe88d5d4 spell: fix crash with IRC color codes in command line (issue #1589)
(cherry picked from commit ee24fac586)
2020-11-20 22:14:22 +01:00
Sébastien Helleu dcccfa2255 Version 3.0.1-dev 2020-11-20 22:14:12 +01:00
6 changed files with 32 additions and 15 deletions
+9
View File
@@ -15,6 +15,15 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
(file _ReleaseNotes.adoc_ in sources). (file _ReleaseNotes.adoc_ in sources).
[[v3.0.1]]
== Version 3.0.1 (2021-01-31)
Bug fixes::
* exec: fix search of command by identifier
* spell: fix refresh of bar item "spell_suggest" when the input becomes empty (issue #1586)
* spell: fix crash with IRC color codes in command line (issue #1589)
[[v3.0]] [[v3.0]]
== Version 3.0 (2020-11-11) == Version 3.0 (2020-11-11)
+5
View File
@@ -17,6 +17,11 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
(file _ChangeLog.adoc_ in sources). (file _ChangeLog.adoc_ in sources).
[[v3.0.1]]
== Version 3.0.1 (2021-01-31)
Bug fix and maintenance release.
[[v3.0]] [[v3.0]]
== Version 3.0 (2020-11-11) == Version 3.0 (2020-11-11)
+1 -1
View File
@@ -89,7 +89,7 @@ exec_search_by_id (const char *id)
error = NULL; error = NULL;
number = strtol (id, &error, 10); number = strtol (id, &error, 10);
if (!error || error[0]) if (!error || error[0])
return NULL; number = -1;
for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd; for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd;
ptr_exec_cmd = ptr_exec_cmd->next_cmd) ptr_exec_cmd = ptr_exec_cmd->next_cmd)
+11 -10
View File
@@ -649,7 +649,7 @@ spell_skip_color_codes (char **string, char **result)
{ {
int color_code_size; int color_code_size;
while (*string[0]) while ((*string)[0])
{ {
color_code_size = weechat_string_color_code_size (*string); color_code_size = weechat_string_color_code_size (*string);
if (color_code_size > 0) if (color_code_size > 0)
@@ -658,9 +658,9 @@ spell_skip_color_codes (char **string, char **result)
weechat_string_dyn_concat (result, *string, color_code_size); weechat_string_dyn_concat (result, *string, color_code_size);
(*string) += color_code_size; (*string) += color_code_size;
} }
else if (*string[0] == '\x02' || *string[0] == '\x0F' else if ((*string)[0] == '\x02' || (*string)[0] == '\x0F'
|| *string[0] == '\x11' || *string[0] == '\x16' || (*string)[0] == '\x11' || (*string)[0] == '\x16'
|| *string[0] == '\x1D' || *string[0] == '\x1F') || (*string)[0] == '\x1D' || (*string)[0] == '\x1F')
{ {
/* /*
* IRC attribute: * IRC attribute:
@@ -674,28 +674,29 @@ spell_skip_color_codes (char **string, char **result)
weechat_string_dyn_concat (result, *string, 1); weechat_string_dyn_concat (result, *string, 1);
(*string)++; (*string)++;
} }
else if (*string[0] == '\x03') else if ((*string)[0] == '\x03')
{ {
/* IRC color code */ /* IRC color code */
weechat_string_dyn_concat (result, *string, 1); weechat_string_dyn_concat (result, *string, 1);
(*string)++; (*string)++;
if (isdigit (*string[0])) if (isdigit ((unsigned char)((*string)[0])))
{ {
/* foreground */ /* foreground */
weechat_string_dyn_concat (result, *string, 1); weechat_string_dyn_concat (result, *string, 1);
(*string)++; (*string)++;
if (isdigit (*string[0])) if (isdigit ((unsigned char)((*string)[0])))
{ {
weechat_string_dyn_concat (result, *string, 1); weechat_string_dyn_concat (result, *string, 1);
(*string)++; (*string)++;
} }
} }
if ((*string[0] == ',') && (isdigit (*string[1]))) if (((*string)[0] == ',')
&& (isdigit ((unsigned char)((*string)[1]))))
{ {
/* background */ /* background */
weechat_string_dyn_concat (result, *string, 1); weechat_string_dyn_concat (result, *string, 1);
(*string)++; (*string)++;
if (isdigit (*string[0])) if (isdigit ((unsigned char)((*string)[0])))
{ {
weechat_string_dyn_concat (result, *string, 1); weechat_string_dyn_concat (result, *string, 1);
(*string)++; (*string)++;
@@ -801,7 +802,7 @@ spell_modifier_cb (const void *pointer, void *data,
color_error = weechat_color (weechat_config_string (spell_config_color_misspelled)); color_error = weechat_color (weechat_config_string (spell_config_color_misspelled));
length = strlen (string); length = strlen (string);
result = weechat_string_dyn_alloc (length * 2); result = weechat_string_dyn_alloc ((length * 2) + 1);
if (!result) if (!result)
return NULL; return NULL;
+3 -3
View File
@@ -32,9 +32,9 @@
# devel-patch the patch version of devel (e.g. 2 for version 1.4.2) # devel-patch the patch version of devel (e.g. 2 for version 1.4.2)
# #
WEECHAT_STABLE=3.0 WEECHAT_STABLE=3.0.1
WEECHAT_DEVEL=3.0 WEECHAT_DEVEL=3.0.1
WEECHAT_DEVEL_FULL=3.0 WEECHAT_DEVEL_FULL=3.0.1
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo >&2 "Syntax: $0 stable|devel|devel-full|devel-major|devel-minor|devel-patch" echo >&2 "Syntax: $0 stable|devel|devel-full|devel-major|devel-minor|devel-patch"
+3 -1
View File
@@ -23,7 +23,7 @@
# #
%define name weechat %define name weechat
%define version 3.0 %define version 3.0.1
%define release 1 %define release 1
Name: %{name} Name: %{name}
@@ -82,6 +82,8 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/share/icons/hicolor/512x512/apps/weechat.png %{_prefix}/share/icons/hicolor/512x512/apps/weechat.png
%changelog %changelog
* Sun Jan 31 2021 Sébastien Helleu <flashcode@flashtux.org> 3.0.1-1
- Released version 3.0.1
* Wed Nov 11 2020 Sébastien Helleu <flashcode@flashtux.org> 3.0-1 * Wed Nov 11 2020 Sébastien Helleu <flashcode@flashtux.org> 3.0-1
- Released version 3.0 - Released version 3.0
* Sat Jul 18 2020 Sébastien Helleu <flashcode@flashtux.org> 2.9-1 * Sat Jul 18 2020 Sébastien Helleu <flashcode@flashtux.org> 2.9-1