projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
985cd22
)
altosui: Don't deref null pyros when saving altimeter config
author
Keith Packard
<keithp@keithp.com>
Thu, 28 Mar 2013 05:11:53 +0000
(22:11 -0700)
committer
Keith Packard
<keithp@keithp.com>
Thu, 28 Mar 2013 05:11:53 +0000
(22:11 -0700)
The check for no pyro config is to compare npyros against zero rather
than check the length of the pyros array as the latter may be null.
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosConfigData.java
patch
|
blob
|
history
diff --git
a/altoslib/AltosConfigData.java
b/altoslib/AltosConfigData.java
index 12659d88100322bffdca273180047356951551fa..45b95646dabfd4ab7687a67973544135d49ed0f5 100644
(file)
--- a/
altoslib/AltosConfigData.java
+++ b/
altoslib/AltosConfigData.java
@@
-476,7
+476,7
@@
public class AltosConfigData implements Iterable<String> {
/* UI doesn't support AES key config */
/* AO_PYRO_NUM */
- if (
pyros.length
> 0) {
+ if (
npyro
> 0) {
for (int p = 0; p < pyros.length; p++) {
link.printf("c P %s\n",
pyros[p].toString());