summaryrefslogtreecommitdiff
path: root/samples/helloworld.golem
diff options
context:
space:
mode:
Diffstat (limited to 'samples/helloworld.golem')
-rw-r--r--samples/helloworld.golem13
1 files changed, 6 insertions, 7 deletions
diff --git a/samples/helloworld.golem b/samples/helloworld.golem
index 473331f..2e0d82c 100644
--- a/samples/helloworld.golem
+++ b/samples/helloworld.golem
@@ -19,14 +19,13 @@ main() {
}
strcpy(dst, src) {
- local rv;
- rv = dst;
+ local i;
+ i = 0;
loop {
- [dst] = [src];
- src = src + 1;
- if ([src] == 0)
- return rv;
- dst = dst + 1;
+ [dst + i] = [src + i];
+ i = i + 1;
+ if ([src + i] == 0)
+ return dst;
}
}