Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
2d2c8fcf
Commit
2d2c8fcf
authored
Nov 18, 2015
by
Uwe Schulzweida
Browse files
streamWriteRecordF: bug fix
parent
8477be05
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_write.c
View file @
2d2c8fcf
...
...
@@ -389,10 +389,7 @@ void streamWriteRecordF(int streamID, const float *data, int nmiss)
// In case the file format does not support single precision reading,
// we fall back to double precision writing, converting the data on the fly.
stream_t
*
streamptr
=
stream_to_pointer
(
streamID
);
int
tsID
=
streamptr
->
curTsID
;
int
vrecID
=
streamptr
->
tsteps
[
tsID
].
curRecID
;
int
recID
=
streamptr
->
tsteps
[
tsID
].
recIDs
[
vrecID
];
int
varID
=
streamptr
->
tsteps
[
tsID
].
records
[
recID
].
varID
;
int
varID
=
streamptr
->
record
->
varID
;
size_t
elementCount
=
(
size_t
)
gridInqSize
(
vlistInqVarGrid
(
streamInqVlist
(
streamID
),
varID
));
double
*
conversionBuffer
=
(
double
*
)
Malloc
(
elementCount
*
sizeof
(
*
conversionBuffer
));
for
(
size_t
i
=
elementCount
;
i
--
;
)
conversionBuffer
[
i
]
=
(
double
)
data
[
i
];
...
...
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