mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 01:23:24 +00:00
Avoid reading an uninitialized variable when adding new cylinders
If mbar = 0 then *p would not be set, but the variable was then used in the calling function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3a37554f35
commit
63c0c7921b
1 changed files with 2 additions and 0 deletions
|
@ -102,6 +102,8 @@ static void convert_volume_pressure(int ml, int mbar, double *v, double *p)
|
|||
else
|
||||
pressure = mbar / 1000.0;
|
||||
*p = pressure;
|
||||
} else {
|
||||
*p = 0;
|
||||
}
|
||||
*v = volume;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue