aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2009-05-19 18:16:08 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2009-05-19 18:16:08 +0000
commit0b123d5ee4441383bffa89f80fa8b92aa770ac44 (patch)
tree96fa318c434a84fa33f5d94c02b4ac7c10a56139
parent888f15f2a62d2a55ee53eed77fbf5984f6cfffc4 (diff)
Fixing overflow bug in bit() macro: (1 << (b)) becomes (1UL << (b))
-rwxr-xr-xcores/arduino/wiring.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/wiring.h b/cores/arduino/wiring.h
index 2f84f78..21d62c7 100755
--- a/cores/arduino/wiring.h
+++ b/cores/arduino/wiring.h
@@ -92,7 +92,7 @@ extern "C"{
typedef unsigned int word;
-#define bit(b) (1 << (b))
+#define bit(b) (1UL << (b))
typedef uint8_t boolean;
typedef uint8_t byte;