Hey, good daddy has come to you! I took a closer look on your function and I tried to compile your code. The output was good, it returned "123456".

POC: http://postimage.org/image/fuae7joij/