Ad
  • Default User Avatar

    Substracting inside an index is susceptible to "substract with overflow". The safer way to do this is with the saturating_sub() method but ideally you'd also want to check the length of the array (not required here).