File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 32
32
#include " cpprest/fileio.h"
33
33
#include " cpprest/astreambuf.h"
34
34
#include " cpprest/streams.h"
35
+ #include < assert.h>
35
36
36
37
#ifndef _CONCRT_H
37
38
#ifndef _LWRCASE_CNCRRNCY
@@ -663,7 +664,9 @@ namespace details {
663
664
return (pos_type)_seekrdpos_fsb (m_info, size_t (m_info->m_rdpos +offset), sizeof (_CharType));
664
665
case std::ios_base::end:
665
666
return (pos_type)_seekrdtoend_fsb (m_info, int64_t (offset), sizeof (_CharType));
666
- break ;
667
+ default :
668
+ // Fail on invalid input (_S_ios_seekdir_end)
669
+ assert (false );
667
670
}
668
671
}
669
672
else if ( (m_info->m_mode & std::ios::ios_base::app) == 0 )
@@ -676,7 +679,9 @@ namespace details {
676
679
return (pos_type)_seekwrpos_fsb (m_info, size_t (m_info->m_wrpos +offset), sizeof (_CharType));
677
680
case std::ios_base::end:
678
681
return (pos_type)_seekwrpos_fsb (m_info, size_t (-1 ), sizeof (_CharType));
679
- break ;
682
+ default :
683
+ // Fail on invalid input (_S_ios_seekdir_end)
684
+ assert (false );
680
685
}
681
686
}
682
687
return (pos_type)traits::eof ();
You can’t perform that action at this time.
0 commit comments