Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brittney allen
purr-data
Commits
23c9d32d
Commit
23c9d32d
authored
8 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Patches
Plain Diff
fix crasher with scalar dialog handling of vector data
parent
5cb2f8b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pd/nw/dialog_data.html
+1
-1
1 addition, 1 deletion
pd/nw/dialog_data.html
pd/src/g_readwrite.c
+11
-2
11 additions, 2 deletions
pd/src/g_readwrite.c
with
12 additions
and
3 deletions
pd/nw/dialog_data.html
+
1
−
1
View file @
23c9d32d
...
...
@@ -62,7 +62,7 @@ function apply() {
data_string
+=
"
;
\n
"
;
// now tack on any vector data we may have
if
(
vector_textarea
)
{
data_string
+=
vector_textarea
.
textContent
;
data_string
+=
vector_textarea
.
value
;
// strip off the trailing semicolon. Otherwise Pd will crash...
data_string
=
data_string
.
slice
(
0
,
-
1
);
}
...
...
This diff is collapsed.
Click to expand it.
pd/src/g_readwrite.c
+
11
−
2
View file @
23c9d32d
...
...
@@ -341,8 +341,17 @@ void canvas_dataproperties(t_canvas *x, t_scalar *sc, t_binbuf *b)
&&
(
template
=
template_findbyname
(((
t_scalar
*
)
newone
)
->
sc_template
)))
{
/* copy new one to old one and delete new one */
memcpy
(
&
((
t_scalar
*
)
oldone
)
->
sc_vec
,
&
((
t_scalar
*
)
newone
)
->
sc_vec
,
template
->
t_n
*
sizeof
(
t_word
));
int
i
;
/* swap out the sc_vec field. That way we'll keep the one from
the new scalar, and the old one will get freed by word_free (which
gets called from pd_free below)
*/
for
(
i
=
0
;
i
<
template
->
t_n
;
i
++
)
{
t_word
w
=
((
t_scalar
*
)
newone
)
->
sc_vec
[
i
];
((
t_scalar
*
)
newone
)
->
sc_vec
[
i
]
=
((
t_scalar
*
)
oldone
)
->
sc_vec
[
i
];
((
t_scalar
*
)
oldone
)
->
sc_vec
[
i
]
=
w
;
}
pd_free
(
&
newone
->
g_pd
);
if
(
glist_isvisible
(
x
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment