Hrdcoded

aerto cvsae at gmx.com
Mon Jan 16 15:16:46 UTC 2023


Hello, and Happy new year. I'm a bit confused.

     uint read()
     {
       assert(pos == 68);

       uint value = 
littleEndianToNative!uint(cast(ubyte[uint.sizeof])buffer[pos..pos+uint.sizeof]);
           pos += uint.sizeof;
           return value;
         }


The above code doesn't work. instead its working perfect when i 
replace buffer[68..68+uint.sizeof] Any thoughts ?


More information about the Digitalmars-d mailing list