• Custom User Avatar

    Hello, This is Great. If possible please do more of katas related to assembly (NASM).

  • Custom User Avatar

    When you do i += integer , you change the value of "i" only not "integer" , the value of integer stays as it is

  • Custom User Avatar

    I cant unerstand how it work,does the value of the integer value preserve the value of 5?
    it should increase incorrectly every time, and because of this, values will be lost, isn't it.
    5+5=10 = integer
    10 + 10 = 20 = integer
    and so on

  • Custom User Avatar

    It looks strange

  • Custom User Avatar
    int cur, idx, amount = 0;
    

    idx is not initialized, meaning its value when the function is entered is arbitrary, and will sometimes cause out-of-bounds accesses, depending on what's on the stack at this point in time

    your allocation of 5 bytes for cStr is also rather optimistic, what if your function is called with "0123456.789.10.11 ? (i dont know if such inputs are tested since the kata is underspecified, but in C you should always be careful)

  • Custom User Avatar
  • Custom User Avatar

    Sorry for the late answer. No, the only thing I have additionally to this is a main function who calls the is_valid_ip func in my VSCode file. The only thing I could think of somewhat similar would maybe be the cStr pointer, which I pass on to the upper function to reset it's values back to 0.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I have just looked at tests in Go. They are weak and rather bad. I'll raise an issue about that. I mark your suggestion as solved since I will include it in a larger issue.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    You cannot always edit a posted message afterward (When? This is still a mystery for me...).

  • Custom User Avatar

    I'm new to the format and don't see an edit suggestion button, so I'll answer in a reply. The language I was speaking of was Go.

  • Custom User Avatar

    What's weird is when one runs your code test after test, here too it works fine. But when running several tests on a row then the code crashes. I didn't examine your code in detail. Don't you have something like a global variable somewhere?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    ur indian?

  • Loading more items...