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
Gabriela Bittencourt
purr-data
Commits
03494071
Commit
03494071
authored
Sep 22, 2019
by
Jonathan Wilkes
Browse files
fix array error handler and set sane default array name value
parent
6cc1baf1
Changes
1
Show whitespace changes
Inline
Side-by-side
externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c
View file @
03494071
...
...
@@ -124,8 +124,11 @@ static void spec2_tabreceive_enable_tilde_dsp(t_spec2_tabreceive_enable_tilde *x
if
(
!
(
a
=
(
t_garray
*
)
pd_findbyclass
(
x
->
x_arrayname
,
garray_class
)))
{
if
(
*
x
->
x_arrayname
->
s_name
)
error
(
"spec2_tabreceive_enable~: %s: no such array"
,
x
->
x_arrayname
->
s_name
);
if
(
x
->
x_arrayname
&&
*
x
->
x_arrayname
->
s_name
)
pd_error
(
x
,
"spec2_tabreceive_enable~: %s: no such array"
,
x
->
x_arrayname
->
s_name
);
else
pd_error
(
x
,
"spec2_tabreceive_enable~: no array name given"
);
}
else
if
(
!
iemarray_getarray
(
a
,
&
vecsize
,
&
x
->
x_vec
))
error
(
"%s: bad template for spec2_tabreceive_enable~"
,
x
->
x_arrayname
->
s_name
);
...
...
@@ -148,6 +151,7 @@ static void *spec2_tabreceive_enable_tilde_new(t_symbol *s, int argc, t_atom *ar
t_spec2_tabreceive_enable_tilde
*
x
=
(
t_spec2_tabreceive_enable_tilde
*
)
pd_new
(
spec2_tabreceive_enable_tilde_class
);
x
->
x_enable
=
0
;
x
->
x_arrayname
=
&
s_
;
if
((
argc
>=
1
)
&&
IS_A_SYMBOL
(
argv
,
0
))
x
->
x_arrayname
=
atom_getsymbolarg
(
0
,
argc
,
argv
);
if
((
argc
>=
2
)
&&
IS_A_FLOAT
(
argv
,
1
))
...
...
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