Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Devesh Prasad
purr-data
Commits
b55306a8
Commit
b55306a8
authored
Aug 01, 2020
by
Jonathan Wilkes
Browse files
quick bugfix to remove unnecessary complexity that caused memory error
parent
90a37d5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_all_guis.c
View file @
b55306a8
...
...
@@ -190,15 +190,6 @@ void iemgui_all_col2save(t_iemgui *x, t_symbol **bflcol)
bflcol
[
2
]
=
color2symbol
(
x
->
x_lcol
);
}
static
void
expand_shorthex
(
char
*
source
,
char
*
doubled
)
{
while
(
*
source
)
{
*
doubled
++
=
*
source
;
*
doubled
++
=
*
source
++
;
}
}
static
int
iemgui_getcolorarg
(
t_iemgui
*
x
,
int
index
,
int
argc
,
t_atom
*
argv
)
{
char
*
classname
;
...
...
@@ -215,11 +206,14 @@ static int iemgui_getcolorarg(t_iemgui *x, int index, int argc, t_atom *argv)
if
(
'#'
==
s
->
s_name
[
0
])
{
char
*
start
=
s
->
s_name
+
1
,
*
end
;
char
expanded
[
6
];
char
expanded
[
7
];
int
len
=
strlen
(
start
);
if
(
len
==
3
)
{
expand_shorthex
(
start
,
expanded
);
sprintf
(
expanded
,
"%c%c%c%c%c%c"
,
start
[
0
],
start
[
0
],
start
[
1
],
start
[
1
],
start
[
2
],
start
[
2
]);
start
=
expanded
;
len
=
6
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment