summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Mangano2013-11-01 17:57:10 +0100
committerFrédéric Mangano2013-11-01 17:57:10 +0100
commit1aa876fdd7fbe25ddf539945f1ead12ea5f7f56a (patch)
tree699ee6491aec6ad878bd93ed68f57df396bb4a57
parentd3942ceac8dc77602f7ae399050b44e92c890933 (diff)
downloadlastos-master.tar.gz
lastos-master.zip
mem: reset offset with @HEADmaster
-rw-r--r--shell.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/shell.c b/shell.c
index 560df3a..55b262d 100644
--- a/shell.c
+++ b/shell.c
@@ -26,12 +26,11 @@ static void mem(struct irc_message *msg, void *data)
arg = hextou32(cmd + 1);
switch (*cmd) {
case '@': /* set or display location */
- if (arg) {
+ if (arg)
*position = (uint8_t*) arg;
- *offset = 0;
- } else {
+ else
irc_privmsg(dst, u32tohex(buffer, (uint32_t) *position));
- }
+ *offset = 0;
break;
case '*': /* dereference */
irc_privmsg(dst, bstohex(buffer, *position + page * arg, page));